SlideShare a Scribd company logo
Introduction Node.js
ERIK VAN APPELDOORN | MARCH 28TH 2014 | SDN EVENT
About me
 Erik van Appeldoorn Trainer | Consultant
 Avans Hogeschool, Academie Industrie & Informatica
 Twitter: @evappeld
 Blog: codeagainstthecode.tumblr.com
 Mail: erixio@xs4all.nl
Subjects
JavaScript WHY?
 Unstructured
 Not intuitive
 Unlogical
 Prototypical Inheritance… WTF?
 Dynamically typed
 No Intellisense/code completion
 Hard to debug
 Global variables
JavaScript is strange (I)
console.log(1 == true); //true
console.log(1 === true); //false
console.log("0" == false); //true
console.log("abc" == "a" + "b" + "c"); //true
console.log(null == undefined); //true
console.log(30 -"7"); //23
console.log("30" + 7); // 307
JavaScript is strange (II)
function rectangle(x,y) {
this.x = x;
this.y = y;
}
rectangle.prototype.area = function() {
return this.x * this.y;
}
var twoByThree = new rectangle(2,3);
console.log(twoByThree.area());
But…JavaScript is relevant
 THE language of the WEB
 Cross-platform
 Huge REACH
 JavaScript is everywhere (client, server, libs, frameworks)
 Single Page Applications
 Server applications
 End-to-End JavaScript applications
Learn JavaScript!
JavaScript the good parts
http://www.youtube.com/watch?v=hQVTIJBZook
Dough Crockford
Learning JavaScript
 http://www.codecademy.com/tracks/javascript
 http://www.w3schools.com/js/default.asp
 http://eloquentjavascript.net/
 Learn Node.js
What is Node.js?
 Open Source, Cross platform Development platform
 Uses V8 JavaScript engine (Google)
 “JavaScript on the server”
 Node.js is a command line tool
Node.js history
 Developed in 2009
 Published in 2011 (Linux only)
 Ryan Dahl, Joyent
 From July 2011 Windows version available
 Active community: check http://nodeconf.com/
Node.js architecture
 Node.js is event-driven with Non-blocking I/O
 Uses a Event loop for Non-blocking I/O
 Node.js is single threaded
Node.js Event loop
Node.js applications
“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.”
 HTTP server
 REST server
 Web Sockets
 TCP server
 Utillities
Building Scalable Network programs
Hello Node.js World!
Hello Node.js World!
+ http server
http://nodejs.org/download/
Text editor
 JetBrains WebStorm
 Sublime Text
 Visual Studio + Node.js tools for Visual Studio
 Nodeclipse
 Cloud9
Node Package Manager (NPM)
 www.npmjs.org
 60.000+ modules
 package.json file (npm init)
 npm install <module.name> --save
 DEMO
Polular NPM modules
express mocha
restify jade
socket.io redis
underscore mongoose
moment request
async connect
grunt passport
Local modules
 DEMO
Node.js Website with express + jade
Node.js Website with express + jade
 Express: http://expressjs.com/
 Connect: http://www.senchalabs.org/connect/
 Jade: http://jade-lang.com/
 DEMO Connect
Features express: Routing
Features express: Views
 DEMO Express + Jade
Node.js REST API with Restify
Restify
 Maps HTTP verbs to CRUD operation
 Handles URL & Body params
 RESTIFY: http://mcavage.me/node-restify/
Restify
 DEMO Restify
WebSockets
Node.js WebSockets with Socket.io
Socket.io
 Bi-directional communication
 WebSockets + fallbacks
 SOCKET.IO: http://socket.io/
Socket.io
 DEMO Socket.io
Server
Client
Node.js with Mongoose & MongoDB
MongoDB
 NoSQL document store
 JSON collections
 MongoDB: http://www.mongodb.org/
 Robomongo: http://robomongo.org/
Mongoose
 Object modelling for MongoDB
 Define schemas in Node.js for MongoDB
 Query building (ODM)
 Mongoose: http://mongoosejs.com/
Mongoose
 DEMO Mongoose & MongoDB
The MEAN stack
http://www.mean.io
QUESTIONS?

More Related Content

What's hot (20)

PPTX
Basic Concept of Node.js & NPM
Bhargav Anadkat
 
PPTX
Node js introduction
Joseph de Castelnau
 
PPTX
Introduction to Node js
Akshay Mathur
 
PPTX
Express js
Manav Prasad
 
PPT
Node.js Basics
TheCreativedev Blog
 
PDF
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Edureka!
 
PPTX
Node js
Fatih Şimşek
 
PPTX
Introduction to NodeJS
Cere Labs Pvt. Ltd
 
PPTX
NodeJS guide for beginners
Enoch Joshua
 
PPTX
Node.js Express
Eyal Vardi
 
PDF
Express node js
Yashprit Singh
 
PDF
Nestjs MasterClass Slides
Nir Kaufman
 
PPTX
Express JS
Alok Guha
 
PPT
Node.js Express Framework
TheCreativedev Blog
 
PDF
NestJS
Wilson Su
 
PDF
Node JS Crash Course
Haim Michael
 
PPTX
Introduction to Node.js
AMD Developer Central
 
PPTX
NodeJS - Server Side JS
Ganesh Kondal
 
PPT
Jsp/Servlet
Sunil OS
 
PPTX
NodeJS
Alok Guha
 
Basic Concept of Node.js & NPM
Bhargav Anadkat
 
Node js introduction
Joseph de Castelnau
 
Introduction to Node js
Akshay Mathur
 
Express js
Manav Prasad
 
Node.js Basics
TheCreativedev Blog
 
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Edureka!
 
Introduction to NodeJS
Cere Labs Pvt. Ltd
 
NodeJS guide for beginners
Enoch Joshua
 
Node.js Express
Eyal Vardi
 
Express node js
Yashprit Singh
 
Nestjs MasterClass Slides
Nir Kaufman
 
Express JS
Alok Guha
 
Node.js Express Framework
TheCreativedev Blog
 
NestJS
Wilson Su
 
Node JS Crash Course
Haim Michael
 
Introduction to Node.js
AMD Developer Central
 
NodeJS - Server Side JS
Ganesh Kondal
 
Jsp/Servlet
Sunil OS
 
NodeJS
Alok Guha
 

Viewers also liked (20)

PDF
Nodejs Explained with Examples
Gabriele Lana
 
PDF
Introduction to Nodejs
Gabriele Lana
 
PDF
Node Foundation Membership Overview 20160907
NodejsFoundation
 
PPT
Node js presentation
martincabrera
 
PDF
Anatomy of a Modern Node.js Application Architecture
AppDynamics
 
PDF
Modern UI Development With Node.js
Ryan Anklam
 
PDF
The Enterprise Case for Node.js
NodejsFoundation
 
KEY
Node.js - Best practices
Felix Geisendörfer
 
PPTX
Nodejs intro
Ndjido Ardo BAR
 
PDF
Architecting large Node.js applications
Sergi Mansilla
 
PDF
How to Build a Web App (for Non-Programmers)
Noah Brier
 
PDF
Node.js and How JavaScript is Changing Server Programming
Tom Croucher
 
PDF
Building servers with Node.js
ConFoo
 
KEY
Writing robust Node.js applications
Tom Croucher
 
PDF
Introduction to Node.js: perspectives from a Drupal dev
mcantelon
 
KEY
Introduction to node.js
jacekbecela
 
PDF
Node.js vs Play Framework
Yevgeniy Brikman
 
PDF
Building APIs with Node.js and MonogDB
Charlie Key
 
PDF
Parse introduction
Tamura Koya
 
KEY
OSCON 2011 - Node.js Tutorial
Tom Croucher
 
Nodejs Explained with Examples
Gabriele Lana
 
Introduction to Nodejs
Gabriele Lana
 
Node Foundation Membership Overview 20160907
NodejsFoundation
 
Node js presentation
martincabrera
 
Anatomy of a Modern Node.js Application Architecture
AppDynamics
 
Modern UI Development With Node.js
Ryan Anklam
 
The Enterprise Case for Node.js
NodejsFoundation
 
Node.js - Best practices
Felix Geisendörfer
 
Nodejs intro
Ndjido Ardo BAR
 
Architecting large Node.js applications
Sergi Mansilla
 
How to Build a Web App (for Non-Programmers)
Noah Brier
 
Node.js and How JavaScript is Changing Server Programming
Tom Croucher
 
Building servers with Node.js
ConFoo
 
Writing robust Node.js applications
Tom Croucher
 
Introduction to Node.js: perspectives from a Drupal dev
mcantelon
 
Introduction to node.js
jacekbecela
 
Node.js vs Play Framework
Yevgeniy Brikman
 
Building APIs with Node.js and MonogDB
Charlie Key
 
Parse introduction
Tamura Koya
 
OSCON 2011 - Node.js Tutorial
Tom Croucher
 
Ad

Similar to Introduction Node.js (20)

PDF
Node azure
Emanuele DelBono
 
PDF
soft-shake.ch - Hands on Node.js
soft-shake.ch
 
PPT
Node js
Chirag Parmar
 
PPTX
Event-driven IO server-side JavaScript environment based on V8 Engine
Ricardo Silva
 
PDF
Node.JS briefly introduced
Alexandre Lachèze
 
PDF
(C)NodeJS
Jackson Tian
 
PDF
Why Node.js
guileen
 
PDF
Why Nodejs Guilin Shanghai
Jackson Tian
 
PDF
Introduction to REST API with Node.js
Yoann Gotthilf
 
PPTX
Node.js on Azure
Sasha Goldshtein
 
ODP
Node js presentation
shereefsakr
 
PDF
Developing realtime apps with Drupal and NodeJS
drupalcampest
 
PPTX
introduction to node.js
orkaplan
 
PPTX
Confoo - Javascript Server Side : How to start
Quentin Adam
 
PPTX
JS & NodeJS - An Introduction
Nirvanic Labs
 
PDF
Develop & Deploy Node.js app on Windows Azure
Andri Yadi
 
PDF
End-to-end HTML5 APIs - The Geek Gathering 2013
Alexandre Morgaut
 
PPTX
Node.js: A Guided Tour
cacois
 
PDF
Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...
GITS Indonesia
 
Node azure
Emanuele DelBono
 
soft-shake.ch - Hands on Node.js
soft-shake.ch
 
Node js
Chirag Parmar
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Ricardo Silva
 
Node.JS briefly introduced
Alexandre Lachèze
 
(C)NodeJS
Jackson Tian
 
Why Node.js
guileen
 
Why Nodejs Guilin Shanghai
Jackson Tian
 
Introduction to REST API with Node.js
Yoann Gotthilf
 
Node.js on Azure
Sasha Goldshtein
 
Node js presentation
shereefsakr
 
Developing realtime apps with Drupal and NodeJS
drupalcampest
 
introduction to node.js
orkaplan
 
Confoo - Javascript Server Side : How to start
Quentin Adam
 
JS & NodeJS - An Introduction
Nirvanic Labs
 
Develop & Deploy Node.js app on Windows Azure
Andri Yadi
 
End-to-end HTML5 APIs - The Geek Gathering 2013
Alexandre Morgaut
 
Node.js: A Guided Tour
cacois
 
Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...
GITS Indonesia
 
Ad

Recently uploaded (20)

PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PPTX
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PPTX
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Tally software_Introduction_Presentation
AditiBansal54083
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 

Introduction Node.js