SlideShare a Scribd company logo
1 of 14
Download to read offline
Node is 
● Open source. 
● Cross-platform. 
● Event-driven. 
● Non-blocking I/O.
Built on V8 
● JavaScript engine for 
Chrome. 
● written in C++. 
● V8 can run standalone, or 
can be embedded into any 
C++ application.
History 
● Created for Linux use in 
2009. 
● By Ryan Dahl 
● Sponsored by Joyent.
Non Blocking IO - Event Loop
Hello World 
setTimeout(function(){ 
console.log('world'); 
},2000); 
console.log('Hello'); 
process.stdin.on('data', function 
(chunk) { 
process.stdout.write('data: ' + 
chunk); 
}); 
● Non-blocking IO needs 
different mindset and 
coding style. 
● You are organizing your 
code around events. 
● Nobody can tell the exact 
sequence of execution 
especially for IO events.
Callback could be a hell 
fs.readFile(my.json', function(err, data) { 
var info = JSON.parse(data); 
db.findOne({id: info.id}, function(err, record) { 
fs.writeFile('my.txt', record.title, function(){ 
console.log('Finish job'); 
}) 
}) 
});
Http Server 
var http = require('http'); 
Import module 
http.createServer(function (request, response) { 
Use module 
response.writeHead(200, {'Content-Type': 'text/plain'}); 
response.end('Hello Worldn'); 
}).listen(8124); 
console.log('Server running at http://127.0.0.1:8124/');
Create Module 
exports.test = function(){ 
console.log("Hi I'm inside 
the test module"); 
} 
● Use exports object to 
externalize function, 
object or class 
● User require function to 
import module into your 
code. 
var module = require('./test2.js'); 
module.test();
Package Manager - npm 
● NPM is the package manager for the 
Node JavaScript platform 
● It puts modules in place so that node 
can find them. 
● Reads all project dependencies from 
package.json 
● Main commands are init, install, link, ls, 
and search. 
{ 
"name": "NewProject", 
"version": "0.0.1", 
"description": "showcase project", 
"main": "index.js", 
"scripts": { 
"test": "node index.js" 
}, 
"keywords": [ 
"new", 
"project" 
], 
"author": "matef", 
"license": "BSD-2-Clause" 
}
Frameworks - ExpressJS 
● Express is a minimal and flexible 
Node.js web application 
framework. 
● Express enables developer to 
organize artifacts and routes and 
views in a simple way. 
● Express has a generator tool that 
build the typical structure for 
simple web project.
IBM® Bluemix™ 
● IBM® Bluemix™ is the IBM open cloud 
platform. 
● Bluemix™ supports Nodejs as one of its 
runtimes. 
● Bluemix™ provides boilerplates for faster 
development start.
Some 
insight into 
Nodejs ...
It is the next big 
thing … catch up :)

More Related Content

What's hot

What's hot (20)

Node.js tutoria for beginner
Node.js tutoria for beginnerNode.js tutoria for beginner
Node.js tutoria for beginner
 
Node js实践
Node js实践Node js实践
Node js实践
 
Nightwatch 101 - Salvador Molina
Nightwatch 101 - Salvador MolinaNightwatch 101 - Salvador Molina
Nightwatch 101 - Salvador Molina
 
Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
 
Hacking NodeJS applications for fun and profit
Hacking NodeJS applications for fun and profitHacking NodeJS applications for fun and profit
Hacking NodeJS applications for fun and profit
 
Nodejs intro
Nodejs introNodejs intro
Nodejs intro
 
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
 
Node ppt
Node pptNode ppt
Node ppt
 
Debug JNI code with ndk-gdb and eclipse GUI
Debug JNI code with ndk-gdb and eclipse GUIDebug JNI code with ndk-gdb and eclipse GUI
Debug JNI code with ndk-gdb and eclipse GUI
 
Use Node.js to create a REST API
Use Node.js to create a REST APIUse Node.js to create a REST API
Use Node.js to create a REST API
 
Getting started with developing Nodejs
Getting started with developing NodejsGetting started with developing Nodejs
Getting started with developing Nodejs
 
Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...
Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...
Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...
 
WebGL
WebGLWebGL
WebGL
 
TDD With Typescript - Noam Katzir
TDD With Typescript - Noam KatzirTDD With Typescript - Noam Katzir
TDD With Typescript - Noam Katzir
 
Start your container journey safely
Start your container journey safelyStart your container journey safely
Start your container journey safely
 
(C)NodeJS
(C)NodeJS(C)NodeJS
(C)NodeJS
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Node.js in 2021
Node.js in 2021Node.js in 2021
Node.js in 2021
 
node.js dao
node.js daonode.js dao
node.js dao
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
 

Viewers also liked

Friday atlas lesson
Friday atlas lessonFriday atlas lesson
Friday atlas lesson
Travis Klein
 
V mware organizing-for-the-cloud-whitepaper
V mware organizing-for-the-cloud-whitepaperV mware organizing-for-the-cloud-whitepaper
V mware organizing-for-the-cloud-whitepaper
EMC
 
La televisió blai
La televisió blaiLa televisió blai
La televisió blai
mgonellgomez
 
産後が起点となる社会問題とマドレボニータの紹介20150613
産後が起点となる社会問題とマドレボニータの紹介20150613産後が起点となる社会問題とマドレボニータの紹介20150613
産後が起点となる社会問題とマドレボニータの紹介20150613
Maco Yoshioka
 
8.presentatie bedrijven.110708js
8.presentatie bedrijven.110708js8.presentatie bedrijven.110708js
8.presentatie bedrijven.110708js
CMBenard
 
Unemployment rates 2014
Unemployment rates 2014Unemployment rates 2014
Unemployment rates 2014
Travis Klein
 
Gdp and economic indicators
Gdp and economic indicatorsGdp and economic indicators
Gdp and economic indicators
Travis Klein
 
Block fascism and italy
Block fascism and italyBlock fascism and italy
Block fascism and italy
Travis Klein
 
Canals de tv via satel·lit asma
Canals de tv via satel·lit asmaCanals de tv via satel·lit asma
Canals de tv via satel·lit asma
mgonellgomez
 

Viewers also liked (20)

New Approaches to Security and Availability for Cloud Data
New Approaches to Security and Availability for Cloud DataNew Approaches to Security and Availability for Cloud Data
New Approaches to Security and Availability for Cloud Data
 
EMC Isilon Best Practices for Hadoop Data Storage
EMC Isilon Best Practices for Hadoop Data StorageEMC Isilon Best Practices for Hadoop Data Storage
EMC Isilon Best Practices for Hadoop Data Storage
 
The Best Infrastructure for OpenStack: VMware vSphere and Virtual SAN
The Best Infrastructure for OpenStack: VMware vSphere and Virtual SANThe Best Infrastructure for OpenStack: VMware vSphere and Virtual SAN
The Best Infrastructure for OpenStack: VMware vSphere and Virtual SAN
 
RSA Online Fraud Report - July 2014
RSA Online Fraud Report - July 2014RSA Online Fraud Report - July 2014
RSA Online Fraud Report - July 2014
 
Friday atlas lesson
Friday atlas lessonFriday atlas lesson
Friday atlas lesson
 
Why Passwords are not strong enough
Why Passwords are not strong enoughWhy Passwords are not strong enough
Why Passwords are not strong enough
 
The EMC Isilon Scale-Out Data Lake
The EMC Isilon Scale-Out Data LakeThe EMC Isilon Scale-Out Data Lake
The EMC Isilon Scale-Out Data Lake
 
V mware organizing-for-the-cloud-whitepaper
V mware organizing-for-the-cloud-whitepaperV mware organizing-for-the-cloud-whitepaper
V mware organizing-for-the-cloud-whitepaper
 
La televisió blai
La televisió blaiLa televisió blai
La televisió blai
 
産後が起点となる社会問題とマドレボニータの紹介20150613
産後が起点となる社会問題とマドレボニータの紹介20150613産後が起点となる社会問題とマドレボニータの紹介20150613
産後が起点となる社会問題とマドレボニータの紹介20150613
 
8.presentatie bedrijven.110708js
8.presentatie bedrijven.110708js8.presentatie bedrijven.110708js
8.presentatie bedrijven.110708js
 
Day 7
Day 7Day 7
Day 7
 
Pivotal CF on Vblock Systems
Pivotal CF on Vblock  Systems Pivotal CF on Vblock  Systems
Pivotal CF on Vblock Systems
 
Unemployment rates 2014
Unemployment rates 2014Unemployment rates 2014
Unemployment rates 2014
 
Monopolistic comp
Monopolistic compMonopolistic comp
Monopolistic comp
 
EMC Greenplum Database version 4.2
EMC Greenplum Database version 4.2 EMC Greenplum Database version 4.2
EMC Greenplum Database version 4.2
 
Gdp and economic indicators
Gdp and economic indicatorsGdp and economic indicators
Gdp and economic indicators
 
Mon roman empire lang
Mon roman empire langMon roman empire lang
Mon roman empire lang
 
Block fascism and italy
Block fascism and italyBlock fascism and italy
Block fascism and italy
 
Canals de tv via satel·lit asma
Canals de tv via satel·lit asmaCanals de tv via satel·lit asma
Canals de tv via satel·lit asma
 

Similar to Nodejs

Similar to Nodejs (20)

Node in Real Time - The Beginning
Node in Real Time - The BeginningNode in Real Time - The Beginning
Node in Real Time - The Beginning
 
Nodejs
NodejsNodejs
Nodejs
 
An introduction to Node.js application development
An introduction to Node.js application developmentAn introduction to Node.js application development
An introduction to Node.js application development
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Ferrara Linux Day 2011
Ferrara Linux Day 2011Ferrara Linux Day 2011
Ferrara Linux Day 2011
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
 
Introduction to REST API with Node.js
Introduction to REST API with Node.jsIntroduction to REST API with Node.js
Introduction to REST API with Node.js
 
Node.js Test
Node.js TestNode.js Test
Node.js Test
 
Node azure
Node azureNode azure
Node azure
 
Node js for beginners
Node js for beginnersNode js for beginners
Node js for beginners
 
Nodejs web service for starters
Nodejs web service for startersNodejs web service for starters
Nodejs web service for starters
 
Nodejs Intro Part One
Nodejs Intro Part OneNodejs Intro Part One
Nodejs Intro Part One
 
Node js training (1)
Node js training (1)Node js training (1)
Node js training (1)
 
Ext GWT - Overview and Implementation Case Study
Ext GWT - Overview and Implementation Case StudyExt GWT - Overview and Implementation Case Study
Ext GWT - Overview and Implementation Case Study
 
New Jersey Red Hat Users Group Presentation: Provisioning anywhere
New Jersey Red Hat Users Group Presentation: Provisioning anywhereNew Jersey Red Hat Users Group Presentation: Provisioning anywhere
New Jersey Red Hat Users Group Presentation: Provisioning anywhere
 
3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don't3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don't
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil Framework
 
SWT Tech Sharing: Node.js + Redis
SWT Tech Sharing: Node.js + RedisSWT Tech Sharing: Node.js + Redis
SWT Tech Sharing: Node.js + Redis
 

Recently uploaded

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (20)

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

Nodejs

  • 1.
  • 2. Node is ● Open source. ● Cross-platform. ● Event-driven. ● Non-blocking I/O.
  • 3. Built on V8 ● JavaScript engine for Chrome. ● written in C++. ● V8 can run standalone, or can be embedded into any C++ application.
  • 4. History ● Created for Linux use in 2009. ● By Ryan Dahl ● Sponsored by Joyent.
  • 5. Non Blocking IO - Event Loop
  • 6. Hello World setTimeout(function(){ console.log('world'); },2000); console.log('Hello'); process.stdin.on('data', function (chunk) { process.stdout.write('data: ' + chunk); }); ● Non-blocking IO needs different mindset and coding style. ● You are organizing your code around events. ● Nobody can tell the exact sequence of execution especially for IO events.
  • 7. Callback could be a hell fs.readFile(my.json', function(err, data) { var info = JSON.parse(data); db.findOne({id: info.id}, function(err, record) { fs.writeFile('my.txt', record.title, function(){ console.log('Finish job'); }) }) });
  • 8. Http Server var http = require('http'); Import module http.createServer(function (request, response) { Use module response.writeHead(200, {'Content-Type': 'text/plain'}); response.end('Hello Worldn'); }).listen(8124); console.log('Server running at http://127.0.0.1:8124/');
  • 9. Create Module exports.test = function(){ console.log("Hi I'm inside the test module"); } ● Use exports object to externalize function, object or class ● User require function to import module into your code. var module = require('./test2.js'); module.test();
  • 10. Package Manager - npm ● NPM is the package manager for the Node JavaScript platform ● It puts modules in place so that node can find them. ● Reads all project dependencies from package.json ● Main commands are init, install, link, ls, and search. { "name": "NewProject", "version": "0.0.1", "description": "showcase project", "main": "index.js", "scripts": { "test": "node index.js" }, "keywords": [ "new", "project" ], "author": "matef", "license": "BSD-2-Clause" }
  • 11. Frameworks - ExpressJS ● Express is a minimal and flexible Node.js web application framework. ● Express enables developer to organize artifacts and routes and views in a simple way. ● Express has a generator tool that build the typical structure for simple web project.
  • 12. IBM® Bluemix™ ● IBM® Bluemix™ is the IBM open cloud platform. ● Bluemix™ supports Nodejs as one of its runtimes. ● Bluemix™ provides boilerplates for faster development start.
  • 13. Some insight into Nodejs ...
  • 14. It is the next big thing … catch up :)