Date post: | 26-Jan-2015 |
Category: |
Technology |
Upload: | kostas-karolemeas |
View: | 110 times |
Download: | 2 times |
NODE.JSa pragmatic approach
Kostas Karolemeashttp://gr.linkedin.com/in/kostaskarolemeas
3rd GreeceJS Meetup
Kostas Karolemeas
3rd GreeceJS Meetup
Kostas Karolemeas
WHAT IS NODE.JS?
Evented I/O for v8 javascript
3rd GreeceJS Meetup
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model
that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
WHY NODE.JS?• Performance and Scalability
• BUT: you need to respect the asynchronous model otherwise node cannot fix late responses…
• End-to-end javascript / reusable code / no need to switch contexts• BUT: a good web developer is not by default a good server-side developer
• AND: you will not be able to write in the same way both sides (e.g. different frameworks)
• Strong, responsive and enthusiastic community
• Many hosting options (IaaS to PaaS)
• Mature development toolsKostas
Karolemeas
3rd GreeceJS Meetup
NODE.JS SERVICES
Kostas Karolemeas
3rd GreeceJS Meetup
Express(web dev. framework)
Express(web dev. framework)
URI routing (e.g. REST
API)
URI routing (e.g. REST
API)
Views (templates)Views (templates)
SessionsSessions
HamlHaml
JadeJade
EJSEJS
Connect(middleware)
Connect(middleware)
Error HandlingError
Handling
Configuration
Configuration
Logging
Logging
Cookies
Cookies
AuthAuth
Session
Stores
Session
Stores
NODE.JS APP STACK
Kostas Karolemeas
3rd GreeceJS Meetup
Express / ConnectExpress / Connect
Async.js(asynchronous call
management)
Async.js(asynchronous call
management)
Winston(multi-transport async logging)
Winston(multi-transport async logging)
Mongoose(async object modeling for MongoDB)
Mongoose(async object modeling for MongoDB)
node-mongodb-native
node-mongodb-native
DEPLOYING NODE.JS
Kostas Karolemeas
3rd GreeceJS Meetup
Redis To GoRedis To Go
BlitzBlitz
LoggingLogging
Release ManagementRelease Management
DynosDynos
FREEFREE
NODE.JS TOOLS
Kostas Karolemeas
3rd GreeceJS Meetup
•npm - package/dependency manager
•Mocha - test framework• Alternative DSL (interfaces) for describing tests
• Alternative Reporters for results
• Runs either from a shell or in a browser
•WebStorm - Javascript IDE• Integrated Node.js launcher / debugger
• Excellent javascript editor
• Very good integration with task management and version control tools
WHAT’S NEXT?
Kostas Karolemeas
3rd GreeceJS Meetup
•Give it a spin!• Install Node.JS and NPM
• Install WebStorm
• Install Git
• Create an account in Heroku and install tools
• Follow Heroku instructions to create a Node.js application
• Use heroku-buildpack-nodejs to install latest Node.js
• Install Heroku add-ons: MongoLab, Redis To Go, Logging, Release Management
THANK YOU!
Kostas Karolemeas
3rd GreeceJS Meetup