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

Node.js tutoria for beginner
Node.js tutoria for beginnerNode.js tutoria for beginner
Node.js tutoria for beginnerManinder Singh
 
Node js实践
Node js实践Node js实践
Node js实践jay li
 
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 profitJose Manuel Ortega Candel
 
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...Edureka!
 
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 GUITom Chen
 
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 APIFabien Vauchelles
 
Getting started with developing Nodejs
Getting started with developing NodejsGetting started with developing Nodejs
Getting started with developing NodejsPhil Hawksworth
 
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...GITS Indonesia
 
TDD With Typescript - Noam Katzir
TDD With Typescript - Noam KatzirTDD With Typescript - Noam Katzir
TDD With Typescript - Noam KatzirWix Engineering
 
Start your container journey safely
Start your container journey safelyStart your container journey safely
Start your container journey safelyRachid Zarouali
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsNodeXperts
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node jsAkshay Mathur
 

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

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 DataEMC
 
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 StorageEMC
 
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 SANEMC
 
RSA Online Fraud Report - July 2014
RSA Online Fraud Report - July 2014RSA Online Fraud Report - July 2014
RSA Online Fraud Report - July 2014EMC
 
Friday atlas lesson
Friday atlas lessonFriday atlas lesson
Friday atlas lessonTravis Klein
 
Why Passwords are not strong enough
Why Passwords are not strong enoughWhy Passwords are not strong enough
Why Passwords are not strong enoughEMC
 
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 LakeEMC
 
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-whitepaperEMC
 
La televisió blai
La televisió blaiLa televisió blai
La televisió blaimgonellgomez
 
産後が起点となる社会問題とマドレボニータの紹介20150613
産後が起点となる社会問題とマドレボニータの紹介20150613産後が起点となる社会問題とマドレボニータの紹介20150613
産後が起点となる社会問題とマドレボニータの紹介20150613Maco Yoshioka
 
8.presentatie bedrijven.110708js
8.presentatie bedrijven.110708js8.presentatie bedrijven.110708js
8.presentatie bedrijven.110708jsCMBenard
 
Pivotal CF on Vblock Systems
Pivotal CF on Vblock  Systems Pivotal CF on Vblock  Systems
Pivotal CF on Vblock Systems EMC
 
Unemployment rates 2014
Unemployment rates 2014Unemployment rates 2014
Unemployment rates 2014Travis Klein
 
EMC Greenplum Database version 4.2
EMC Greenplum Database version 4.2 EMC Greenplum Database version 4.2
EMC Greenplum Database version 4.2 EMC
 
Gdp and economic indicators
Gdp and economic indicatorsGdp and economic indicators
Gdp and economic indicatorsTravis Klein
 
Mon roman empire lang
Mon roman empire langMon roman empire lang
Mon roman empire langTravis Klein
 
Block fascism and italy
Block fascism and italyBlock fascism and italy
Block fascism and italyTravis 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 asmamgonellgomez
 

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

Node in Real Time - The Beginning
Node in Real Time - The BeginningNode in Real Time - The Beginning
Node in Real Time - The BeginningAxilis
 
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 developmentshelloidhq
 
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 ThingsMichael Lange
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Ganesh Kondal
 
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 AssafAhmed 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.jsYoann Gotthilf
 
Nodejs web service for starters
Nodejs web service for startersNodejs web service for starters
Nodejs web service for startersBruce Li
 
Node js training (1)
Node js training (1)Node js training (1)
Node js training (1)Ashish Gupta
 
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 StudyAvi Perez
 
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 anywhereRodrique Heron
 
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'tF5 Buddy
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil FrameworkVeilFramework
 

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

Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 

Recently uploaded (20)

Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 

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 :)