SlideShare a Scribd company logo
Nodejs
Click to edit Master text styles
What is Node.Js ?
Node.js is a JavaScript runtime, built on Chrome's V8 JavaScript
engine.
Node.js uses an event-driven, non-blocking I/O model that makes it
lightweight and efficient.
Node.js' package ecosystem, npm, is the largest ecosystem of open
source libraries in the world.
Click to edit Master text styles
The Creator
“Ryan Dahl is an American freelance programmer living in Germany.
His work invariably involves interruptible parsers, event loops, and
response time histograms. He is the creator of several open source
projects including the Ebb web server and the "EY" load balancer
module for Nginx.”
Click to edit Master text styles
Install NodeJS on your machine
Go to https://nodejs.org.
Starting a node project
Click to edit Master text styles
Syntax Convections
The error-first pattern was used into Node
• The first argument of the callback is reserved for an error object
• The second argument of the callback is reserved for any successful response data.
DEFINING AN ERROR-FIRST CALLBACK
Click to edit Master text styles
How do NodeJS Works ?
• NodeJS Console :
Node.js comes with virtual environment called REPL (aka Node shell). REPL stands for Read-Eval-Print-Loop.
• V8 Engine runs on the machine
Click to edit Master text styles
How do NodeJS Works ?
• Architecture :
Click to edit Master text styles
How do NodeJS Works ? Example
Click to edit Master text styles
How do NodeJS Works ? Example
Click to edit Master text styles
Require Module
Click to edit Master text styles
Chrome's V8 JavaScript engine
It handles memory allocation and garbage collection.
Read more: http://thibaultlaurens.github.io/javascript/2013/04/29/how-the-v8-engine-works/
Google’s V8 engine, written in C++, compiles and executes
JavaScript source code.
Its design consists of two compilers that compile source code
directly into machine code. –Full Codegen, -CrankShift
A JavaScript engine is a program or library which executes
JavaScript code.
Click to edit Master text styles
Do we have other JavaScript engines ?
Browser, Headless Browser, or Runtime JavaScript Engine
Mozilla Spidermonkey
Chrome V8
Safari JavaScriptCore / Nitro
IE and Edge Chakra
PhantomJS JavaScriptCore
HTMLUnit Rhino
TrifleJS V8
Node.js V8
Io.js V8
Click to edit Master text styles
What are its alternatives ?
• github.com/reactor/reactor (jvm)
• vertx.io (jvm)
• coolio.github.io (ruby)
• github.com/blesh/ALE (.net)
• reactphp.org (php)
• cyclone.io (python)
Click to edit Master text styles
Why is it becoming popular?
• High-Performance
• Easy to modify and maintain
• Productivity
• Reduce the number of servers needed to serve customers
• Data Intensive Real Apps
Click to edit Master text styles
Application Areas for Node.js
• The Internet of Things
• E-Commerce
• Payment Processing
• Social Media
• Realtime Services
• Media
• Enterprise Web Service
Click to edit Master text styles
Who all are using NodeJs
Click to edit Master text styles
What is NPM ?
It is also a command-line utility for interacting with
repository that aids in package installation, version
management, and dependency management
It is an online repository for the publishing of open-
source Node.js projects
Short for Node Package Manager
Basically it is the package manager for node. It
helps with installing various packages and
resolving their various dependencies
Click to edit Master text styles
What is NPM ?
https://www.npmjs.com/
Click to edit Master text styles
What are some well known Frameworks?
• Node.js Express. ...
• Sail.js (node.js mvc) ...
• KOA. ...
• Meteor - Full Stack Node.js Framework. ...
• Derby.js. ...
• Flatiron.js (Node.js MVC Framework) ...
• Hapi - Node.js Web Application Framework. ...
• Mean.IO - Node.js Application Framework.
Click to edit Master text styles
Express JS
• inspired by the Ruby project 'Sinatra‘
• most popular
• Allows to set up middlewares to respond to HTTP Requests.
• Defines a routing table which is used to perform different actions based on HTTP Method and URL.
• Allows to dynamically render HTML Pages based on passing arguments to templates
• Easy to learn
Learn more at nodejs.org
Thank you
Ad

More Related Content

What's hot (19)

Best node js course
Best node js courseBest node js course
Best node js course
bestonlinecoursescoupon
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web Development
Irfan Maulana
 
Nodejs
NodejsNodejs
Nodejs
Prem Sanil
 
Afrimadoni the power of docker
Afrimadoni   the power of dockerAfrimadoni   the power of docker
Afrimadoni the power of docker
PHP Indonesia
 
Nodejs basics
Nodejs basicsNodejs basics
Nodejs basics
monikadeshmane
 
Node js for beginners
Node js for beginnersNode js for beginners
Node js for beginners
Arjun Sreekumar
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
Colin Mackay
 
Node.js Basics
Node.js Basics Node.js Basics
Node.js Basics
TheCreativedev Blog
 
Node.js an introduction
Node.js   an introductionNode.js   an introduction
Node.js an introduction
Meraj Khattak
 
Intro to Node.js (v1)
Intro to Node.js (v1)Intro to Node.js (v1)
Intro to Node.js (v1)
Chris Cowan
 
Node.js with Express
Node.js with ExpressNode.js with Express
Node.js with Express
Gergely Németh
 
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
Yoann Gotthilf
 
Node js training (1)
Node js training (1)Node js training (1)
Node js training (1)
Ashish Gupta
 
NodeSummit - MEAN Stack
NodeSummit - MEAN StackNodeSummit - MEAN Stack
NodeSummit - MEAN Stack
Valeri Karpov
 
Node js projects
Node js projectsNode js projects
Node js projects
💾 Radek Fabisiak
 
Node
NodeNode
Node
Manav Prasad
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jiban
Jibanananda Sana
 
NodeJS
NodeJSNodeJS
NodeJS
Predhin Sapru
 
Node, express & sails
Node, express & sailsNode, express & sails
Node, express & sails
Brian Shannon
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web Development
Irfan Maulana
 
Afrimadoni the power of docker
Afrimadoni   the power of dockerAfrimadoni   the power of docker
Afrimadoni the power of docker
PHP Indonesia
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
Colin Mackay
 
Node.js an introduction
Node.js   an introductionNode.js   an introduction
Node.js an introduction
Meraj Khattak
 
Intro to Node.js (v1)
Intro to Node.js (v1)Intro to Node.js (v1)
Intro to Node.js (v1)
Chris Cowan
 
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
Yoann Gotthilf
 
Node js training (1)
Node js training (1)Node js training (1)
Node js training (1)
Ashish Gupta
 
NodeSummit - MEAN Stack
NodeSummit - MEAN StackNodeSummit - MEAN Stack
NodeSummit - MEAN Stack
Valeri Karpov
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jiban
Jibanananda Sana
 
Node, express & sails
Node, express & sailsNode, express & sails
Node, express & sails
Brian Shannon
 

Viewers also liked (7)

Does Clean Water Make You Dirty
Does Clean Water Make You DirtyDoes Clean Water Make You Dirty
Does Clean Water Make You Dirty
Jeff van Geete
 
Patrick Basile
Patrick BasilePatrick Basile
Patrick Basile
Jeffrey Carlisle
 
Osallistava suunnittelu
Osallistava suunnitteluOsallistava suunnittelu
Osallistava suunnittelu
Seija Kiiskilä
 
Tavoitteellinen ja-tuloksekas-tapahtuma
Tavoitteellinen ja-tuloksekas-tapahtumaTavoitteellinen ja-tuloksekas-tapahtuma
Tavoitteellinen ja-tuloksekas-tapahtuma
Seija Kiiskilä
 
Portal framed construction
Portal framed constructionPortal framed construction
Portal framed construction
svrp7
 
Модуль "Личный Стиль"
Модуль "Личный Стиль"Модуль "Личный Стиль"
Модуль "Личный Стиль"
Иван Конюхов
 
Sandesh
SandeshSandesh
Sandesh
svrp7
 
Does Clean Water Make You Dirty
Does Clean Water Make You DirtyDoes Clean Water Make You Dirty
Does Clean Water Make You Dirty
Jeff van Geete
 
Tavoitteellinen ja-tuloksekas-tapahtuma
Tavoitteellinen ja-tuloksekas-tapahtumaTavoitteellinen ja-tuloksekas-tapahtuma
Tavoitteellinen ja-tuloksekas-tapahtuma
Seija Kiiskilä
 
Portal framed construction
Portal framed constructionPortal framed construction
Portal framed construction
svrp7
 
Sandesh
SandeshSandesh
Sandesh
svrp7
 
Ad

Similar to Nodejs (20)

Node JS Roadmap for Beginners By Scholarhat PDF
Node JS Roadmap for Beginners By Scholarhat PDFNode JS Roadmap for Beginners By Scholarhat PDF
Node JS Roadmap for Beginners By Scholarhat PDF
Scholarhat
 
Node js Powerpoint Presentation by PDEU Gandhinagar
Node js Powerpoint Presentation by PDEU GandhinagarNode js Powerpoint Presentation by PDEU Gandhinagar
Node js Powerpoint Presentation by PDEU Gandhinagar
tirthuce22
 
Node J pdf.docx
Node J pdf.docxNode J pdf.docx
Node J pdf.docx
PSK Technolgies Pvt. Ltd. IT Company Nagpur
 
Node J pdf.docx
Node J pdf.docxNode J pdf.docx
Node J pdf.docx
PSK Technolgies Pvt. Ltd. IT Company Nagpur
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
Balajihope
 
Deno vs Node.js: A Comprehensive Comparison.docx
Deno vs Node.js: A Comprehensive Comparison.docxDeno vs Node.js: A Comprehensive Comparison.docx
Deno vs Node.js: A Comprehensive Comparison.docx
Vignesh Nethaji
 
Java Script recruiting
Java Script recruitingJava Script recruiting
Java Script recruiting
Ihor Odynets
 
Top 10 frameworks of node js
Top 10 frameworks of node jsTop 10 frameworks of node js
Top 10 frameworks of node js
HabileLabs
 
Node JS Interview Question PDF By ScholarHat
Node JS Interview Question PDF By ScholarHatNode JS Interview Question PDF By ScholarHat
Node JS Interview Question PDF By ScholarHat
Scholarhat
 
Node Js Non-blocking or asynchronous Blocking or synchronous.pdf
Node Js Non-blocking or asynchronous  Blocking or synchronous.pdfNode Js Non-blocking or asynchronous  Blocking or synchronous.pdf
Node Js Non-blocking or asynchronous Blocking or synchronous.pdf
DarshanaMallick
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
Krishnaprasad k
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
Krishnaprasad k
 
concept of server-side JavaScript / JS Framework: NODEJS
concept of server-side JavaScript / JS Framework: NODEJSconcept of server-side JavaScript / JS Framework: NODEJS
concept of server-side JavaScript / JS Framework: NODEJS
Kongu Engineering College, Perundurai, Erode
 
You Got React.js in My PHP
You Got React.js in My PHPYou Got React.js in My PHP
You Got React.js in My PHP
Taylor Lovett
 
Meanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore ChandraMeanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore Chandra
Kishore Chandra
 
MERN PPT
MERN PPTMERN PPT
MERN PPT
NeerajGupta96647
 
Nodejs
NodejsNodejs
Nodejs
Bhushan Patil
 
An introduction to Node.js
An introduction to Node.jsAn introduction to Node.js
An introduction to Node.js
Kasey McCurdy
 
Understanding Node.js and Django.docx
Understanding Node.js and Django.docxUnderstanding Node.js and Django.docx
Understanding Node.js and Django.docx
Savior_Marketing
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Rob O'Doherty
 
Node JS Roadmap for Beginners By Scholarhat PDF
Node JS Roadmap for Beginners By Scholarhat PDFNode JS Roadmap for Beginners By Scholarhat PDF
Node JS Roadmap for Beginners By Scholarhat PDF
Scholarhat
 
Node js Powerpoint Presentation by PDEU Gandhinagar
Node js Powerpoint Presentation by PDEU GandhinagarNode js Powerpoint Presentation by PDEU Gandhinagar
Node js Powerpoint Presentation by PDEU Gandhinagar
tirthuce22
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
Balajihope
 
Deno vs Node.js: A Comprehensive Comparison.docx
Deno vs Node.js: A Comprehensive Comparison.docxDeno vs Node.js: A Comprehensive Comparison.docx
Deno vs Node.js: A Comprehensive Comparison.docx
Vignesh Nethaji
 
Java Script recruiting
Java Script recruitingJava Script recruiting
Java Script recruiting
Ihor Odynets
 
Top 10 frameworks of node js
Top 10 frameworks of node jsTop 10 frameworks of node js
Top 10 frameworks of node js
HabileLabs
 
Node JS Interview Question PDF By ScholarHat
Node JS Interview Question PDF By ScholarHatNode JS Interview Question PDF By ScholarHat
Node JS Interview Question PDF By ScholarHat
Scholarhat
 
Node Js Non-blocking or asynchronous Blocking or synchronous.pdf
Node Js Non-blocking or asynchronous  Blocking or synchronous.pdfNode Js Non-blocking or asynchronous  Blocking or synchronous.pdf
Node Js Non-blocking or asynchronous Blocking or synchronous.pdf
DarshanaMallick
 
You Got React.js in My PHP
You Got React.js in My PHPYou Got React.js in My PHP
You Got React.js in My PHP
Taylor Lovett
 
Meanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore ChandraMeanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore Chandra
Kishore Chandra
 
An introduction to Node.js
An introduction to Node.jsAn introduction to Node.js
An introduction to Node.js
Kasey McCurdy
 
Understanding Node.js and Django.docx
Understanding Node.js and Django.docxUnderstanding Node.js and Django.docx
Understanding Node.js and Django.docx
Savior_Marketing
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Rob O'Doherty
 
Ad

Nodejs

  • 2. Click to edit Master text styles What is Node.Js ? Node.js is a JavaScript runtime, built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world.
  • 3. Click to edit Master text styles The Creator “Ryan Dahl is an American freelance programmer living in Germany. His work invariably involves interruptible parsers, event loops, and response time histograms. He is the creator of several open source projects including the Ebb web server and the "EY" load balancer module for Nginx.”
  • 4. Click to edit Master text styles Install NodeJS on your machine Go to https://nodejs.org. Starting a node project
  • 5. Click to edit Master text styles Syntax Convections The error-first pattern was used into Node • The first argument of the callback is reserved for an error object • The second argument of the callback is reserved for any successful response data. DEFINING AN ERROR-FIRST CALLBACK
  • 6. Click to edit Master text styles How do NodeJS Works ? • NodeJS Console : Node.js comes with virtual environment called REPL (aka Node shell). REPL stands for Read-Eval-Print-Loop. • V8 Engine runs on the machine
  • 7. Click to edit Master text styles How do NodeJS Works ? • Architecture :
  • 8. Click to edit Master text styles How do NodeJS Works ? Example
  • 9. Click to edit Master text styles How do NodeJS Works ? Example
  • 10. Click to edit Master text styles Require Module
  • 11. Click to edit Master text styles Chrome's V8 JavaScript engine It handles memory allocation and garbage collection. Read more: http://thibaultlaurens.github.io/javascript/2013/04/29/how-the-v8-engine-works/ Google’s V8 engine, written in C++, compiles and executes JavaScript source code. Its design consists of two compilers that compile source code directly into machine code. –Full Codegen, -CrankShift A JavaScript engine is a program or library which executes JavaScript code.
  • 12. Click to edit Master text styles Do we have other JavaScript engines ? Browser, Headless Browser, or Runtime JavaScript Engine Mozilla Spidermonkey Chrome V8 Safari JavaScriptCore / Nitro IE and Edge Chakra PhantomJS JavaScriptCore HTMLUnit Rhino TrifleJS V8 Node.js V8 Io.js V8
  • 13. Click to edit Master text styles What are its alternatives ? • github.com/reactor/reactor (jvm) • vertx.io (jvm) • coolio.github.io (ruby) • github.com/blesh/ALE (.net) • reactphp.org (php) • cyclone.io (python)
  • 14. Click to edit Master text styles Why is it becoming popular? • High-Performance • Easy to modify and maintain • Productivity • Reduce the number of servers needed to serve customers • Data Intensive Real Apps
  • 15. Click to edit Master text styles Application Areas for Node.js • The Internet of Things • E-Commerce • Payment Processing • Social Media • Realtime Services • Media • Enterprise Web Service
  • 16. Click to edit Master text styles Who all are using NodeJs
  • 17. Click to edit Master text styles What is NPM ? It is also a command-line utility for interacting with repository that aids in package installation, version management, and dependency management It is an online repository for the publishing of open- source Node.js projects Short for Node Package Manager Basically it is the package manager for node. It helps with installing various packages and resolving their various dependencies
  • 18. Click to edit Master text styles What is NPM ? https://www.npmjs.com/
  • 19. Click to edit Master text styles What are some well known Frameworks? • Node.js Express. ... • Sail.js (node.js mvc) ... • KOA. ... • Meteor - Full Stack Node.js Framework. ... • Derby.js. ... • Flatiron.js (Node.js MVC Framework) ... • Hapi - Node.js Web Application Framework. ... • Mean.IO - Node.js Application Framework.
  • 20. Click to edit Master text styles Express JS • inspired by the Ruby project 'Sinatra‘ • most popular • Allows to set up middlewares to respond to HTTP Requests. • Defines a routing table which is used to perform different actions based on HTTP Method and URL. • Allows to dynamically render HTML Pages based on passing arguments to templates • Easy to learn
  • 21. Learn more at nodejs.org Thank you