SlideShare a Scribd company logo
INTRODUCTION
TO NODE JS
1
Monica Deshmane(H.V.Desai College, Pune)
What we Learn?
points
Monica Deshmane(H.V.Desai College, Pune)
2.1 Introduction
2.2 What is Node ?
2.3 Traditional Web Server Model
2.4 Node JS Process model
Introduction
Why node js?
Node.js uses asynchronous programming!
Ex. a web server opens a file on the server and return
the content to the client.
Here is how PHP or ASP handles a file request:
1. Sends the task to the computer's file system.
2. Waits till the file system opens and reads the file.
3. Returns the content to the client.
Ready to handle the next request.
Why node js?
Monica Deshmane(H.V.Desai College, Pune)
Introduction
Here is how Node.js handles a file request:
1. Sends request to the computer's file system.
2. Ready to handle the next request.
3. When the file system has opened and read the file,
4. the server returns the content to the browser.
Node.js minimizes the waiting, and simply continues with
the next request.
Node.js runs single-threaded, non-blocking,non-waiting
asynchronously programming, which is very memory
efficient.
Why node js?
Monica Deshmane(H.V.Desai College, Pune)
Basics of Node JS
What is node js?
Node.js is an open source ,
cross-platform runtime environment
for developing server-side applications
and networking applications
Node.js is free
Node.js runs on various platforms
(Windows, Linux, Unix, Mac OS X, etc.)
Node.js uses JavaScript on the server
Node.js was developed by Ryan Dahl in 2009 and its
latest version is v0.10.36(now it may vary)
What is
node js?
Monica Deshmane(H.V.Desai College, Pune)
Basics of Node JS
What Can Node.js Do?
Node.js can generate dynamically page contents
Node.js can create, open, read, write, delete, and close files
i.e perform operations with files on the server
Node.js can perform operations on data like, add, delete, modify
and collect data from your database
What is a Node.js File?
Node.js files contain tasks that will be executed on certain events.
An event is for trying to access a port on the server
Node.js files must be initiated on the server before having any
effect
Node.js files have extension ".js"
What
node js does?
Monica Deshmane(H.V.Desai College, Pune)
Features of Node.js
1. Asynchronous and Event Driven −
 All APIs of Node.js library are asynchronous,
means, Node.js server not waits for an API to
return data.
 The server moves to the next API after calling it and a
notification mechanism of Events of Node.js helps
the server to get a response from the previous API
call.
2.Very Fast −
 It built on Google Chrome'sV8 JavaScript Engine, so
Node.js library is very fast for code execution.
7
Features of Node.js(continue..)
3. SingleThreaded but Highly Scalable −
 Node.js uses a single threaded model with
event looping.
 Node.js uses a single threaded program and
the same program can provide service to a
number of requests than traditional servers
like Apache Server.
4. No Buffering −
 Node.js applications never buffer any data.
 But output the data in chunks.
5. Node.js is released under the MIT license
8
(Revise)Features of Node.js
 Asynchronous and Event Driven
 Very Fast
 SingleThreaded but Highly Scalable
 No Buffering
 License
9
Advantages of Node JS
1. Node.js offers an Easy Scalability
it easy to scale the applications
in horizontal by adding nodes in system and
in vertical by adding extra resources to the single nodes .
2. Easy to Learn And light weight framework
3. Node.js is used as a Single Programming Language
allows the Node.js developers to write both the front-end
as well as the back-end web application in JavaScript using a
runtime environment.
4. The Benefit of Fullstack JS
It saves both money and time.
5. Known for Offering High Performance
The speed of the code execution increased by runtime environment
as it supports the non-blocking I/O operations.
6 . The Support of Large and Active Community
Advantages
Monica Deshmane(H.V.Desai College, Pune)
The Drawbacks of Node.js
Drawbacks
1. Application Programming Interface (API) is Not Stable
2. not having a Strong Library Support System
3. Asynchronous Programming Model
Applications of node js
1.Game developments
2.Designing servers
3.Collaborative work
4.Chatting applications
Traditional Web Server Model
Process
request
Monica Deshmane(H.V.Desai College, Pune)
Node JS Process model
asynchronous
web server model
using Node.js.
Monica Deshmane(H.V.Desai College, Pune)
Node JS Process model
•Node.js processes user requests differently when
compared to a traditional web server model.
• Node.js runs in a single process and the application code
runs in a single thread and so needs less resources.
All the user requests to your web application handled by a
single thread and all the I/O work or long running job.
So, this single thread doesn't have to wait for the request to
complete and is free to handle simultaneousely the next
request.
If there is no blocking process, node will prepare the
response immediately and send it back to client.
continue....
Monica Deshmane(H.V.Desai College, Pune)
16
Monica Deshmane(H.V.Desai College, Pune)
Any Questions?
Ad

More Related Content

What's hot (20)

Node js - Enterprise Class
Node js - Enterprise ClassNode js - Enterprise Class
Node js - Enterprise Class
Glenn Block
 
Node js
Node jsNode js
Node js
Chirag Parmar
 
A Journey Begin with Node.js
A Journey Begin with Node.jsA Journey Begin with Node.js
A Journey Begin with Node.js
Khalid Farhan
 
Node js for beginners
Node js for beginnersNode js for beginners
Node js for beginners
Arjun Sreekumar
 
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
F5 Buddy
 
Node js projects
Node js projectsNode js projects
Node js projects
💾 Radek Fabisiak
 
Node js Introduction
Node js IntroductionNode js Introduction
Node js Introduction
sanskriti agarwal
 
Node
NodeNode
Node
Manav Prasad
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
Bhargav Anadkat
 
NodeJS
NodeJSNodeJS
NodeJS
Predhin Sapru
 
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, DhakaJavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
Nurul Ferdous
 
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
Prem Sanil
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Rob O'Doherty
 
Node js
Node jsNode js
Node js
Krishna Chaytaniah
 
Nodejs server lesson 3
 Nodejs server lesson 3 Nodejs server lesson 3
Nodejs server lesson 3
SamuelAdetunji2
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
Pragnesh Vaghela
 
Node js Global Packages
Node js Global PackagesNode js Global Packages
Node js Global Packages
sanskriti agarwal
 
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 introduction
Node js introductionNode js introduction
Node js introduction
Joseph de Castelnau
 
Node js - Enterprise Class
Node js - Enterprise ClassNode js - Enterprise Class
Node js - Enterprise Class
Glenn Block
 
A Journey Begin with Node.js
A Journey Begin with Node.jsA Journey Begin with Node.js
A Journey Begin with Node.js
Khalid Farhan
 
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
F5 Buddy
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
Bhargav Anadkat
 
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, DhakaJavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
Nurul Ferdous
 
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
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Rob O'Doherty
 
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
 

Similar to Nodejs basics (20)

Introduction to Node.JS
Introduction to Node.JSIntroduction to Node.JS
Introduction to Node.JS
Collaboration Technologies
 
Introduction to Node JS.pdf
Introduction to Node JS.pdfIntroduction to Node JS.pdf
Introduction to Node JS.pdf
Bareen Shaikh
 
Building Applications With the MEAN Stack
Building Applications With the MEAN StackBuilding Applications With the MEAN Stack
Building Applications With the MEAN Stack
Nir Noy
 
node.js interview questions and answers.
node.js interview questions and answers.node.js interview questions and answers.
node.js interview questions and answers.
JyothiAmpally
 
node_js.pptx
node_js.pptxnode_js.pptx
node_js.pptx
dipen55
 
NodeJS.pptx
NodeJS.pptxNodeJS.pptx
NodeJS.pptx
Govardhan Bhavani
 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tour
cacois
 
NodeJS ecosystem
NodeJS ecosystemNodeJS ecosystem
NodeJS ecosystem
Yukti Kaura
 
Node Session - 1
Node Session - 1Node Session - 1
Node Session - 1
Bhavin Shah
 
Top 30 Node.js interview questions
Top 30 Node.js interview questionsTop 30 Node.js interview questions
Top 30 Node.js interview questions
techievarsity
 
Kalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect GuideKalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect Guide
Kalp Corporate
 
Meanstack overview
Meanstack overviewMeanstack overview
Meanstack overview
Adthasid Sabmake
 
Node.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About itNode.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About it
Fibonalabs
 
NodeJS or Apache: Unveiling the Differences in Performance, Use Cases, and Se...
NodeJS or Apache: Unveiling the Differences in Performance, Use Cases, and Se...NodeJS or Apache: Unveiling the Differences in Performance, Use Cases, and Se...
NodeJS or Apache: Unveiling the Differences in Performance, Use Cases, and Se...
Tien Nguyen
 
Node.js Workshop - Sela SDP 2015
Node.js Workshop  - Sela SDP 2015Node.js Workshop  - Sela SDP 2015
Node.js Workshop - Sela SDP 2015
Nir Noy
 
MEAN stack for Web Application Development
MEAN stack for Web Application DevelopmentMEAN stack for Web Application Development
MEAN stack for Web Application Development
smartguykrish11
 
Node js installation steps.pptx slide share ppts
Node js installation steps.pptx slide share pptsNode js installation steps.pptx slide share ppts
Node js installation steps.pptx slide share ppts
HemaSenthil5
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginners
Enoch Joshua
 
module for backend full stack applications 1.pptx
module for backend full stack applications 1.pptxmodule for backend full stack applications 1.pptx
module for backend full stack applications 1.pptx
hemalathas752360
 
Live Node.JS Training
Live Node.JS TrainingLive Node.JS Training
Live Node.JS Training
mindmajixtrainings
 
Introduction to Node JS.pdf
Introduction to Node JS.pdfIntroduction to Node JS.pdf
Introduction to Node JS.pdf
Bareen Shaikh
 
Building Applications With the MEAN Stack
Building Applications With the MEAN StackBuilding Applications With the MEAN Stack
Building Applications With the MEAN Stack
Nir Noy
 
node.js interview questions and answers.
node.js interview questions and answers.node.js interview questions and answers.
node.js interview questions and answers.
JyothiAmpally
 
node_js.pptx
node_js.pptxnode_js.pptx
node_js.pptx
dipen55
 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tour
cacois
 
NodeJS ecosystem
NodeJS ecosystemNodeJS ecosystem
NodeJS ecosystem
Yukti Kaura
 
Node Session - 1
Node Session - 1Node Session - 1
Node Session - 1
Bhavin Shah
 
Top 30 Node.js interview questions
Top 30 Node.js interview questionsTop 30 Node.js interview questions
Top 30 Node.js interview questions
techievarsity
 
Kalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect GuideKalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect Guide
Kalp Corporate
 
Node.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About itNode.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About it
Fibonalabs
 
NodeJS or Apache: Unveiling the Differences in Performance, Use Cases, and Se...
NodeJS or Apache: Unveiling the Differences in Performance, Use Cases, and Se...NodeJS or Apache: Unveiling the Differences in Performance, Use Cases, and Se...
NodeJS or Apache: Unveiling the Differences in Performance, Use Cases, and Se...
Tien Nguyen
 
Node.js Workshop - Sela SDP 2015
Node.js Workshop  - Sela SDP 2015Node.js Workshop  - Sela SDP 2015
Node.js Workshop - Sela SDP 2015
Nir Noy
 
MEAN stack for Web Application Development
MEAN stack for Web Application DevelopmentMEAN stack for Web Application Development
MEAN stack for Web Application Development
smartguykrish11
 
Node js installation steps.pptx slide share ppts
Node js installation steps.pptx slide share pptsNode js installation steps.pptx slide share ppts
Node js installation steps.pptx slide share ppts
HemaSenthil5
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginners
Enoch Joshua
 
module for backend full stack applications 1.pptx
module for backend full stack applications 1.pptxmodule for backend full stack applications 1.pptx
module for backend full stack applications 1.pptx
hemalathas752360
 
Ad

More from monikadeshmane (20)

File system node js
File system node jsFile system node js
File system node js
monikadeshmane
 
Nodejs functions & modules
Nodejs functions & modulesNodejs functions & modules
Nodejs functions & modules
monikadeshmane
 
Nodejs buffers
Nodejs buffersNodejs buffers
Nodejs buffers
monikadeshmane
 
Intsllation & 1st program nodejs
Intsllation & 1st program nodejsIntsllation & 1st program nodejs
Intsllation & 1st program nodejs
monikadeshmane
 
Chap 5 php files part-2
Chap 5 php files   part-2Chap 5 php files   part-2
Chap 5 php files part-2
monikadeshmane
 
Chap 5 php files part 1
Chap 5 php files part 1Chap 5 php files part 1
Chap 5 php files part 1
monikadeshmane
 
Chap4 oop class (php) part 2
Chap4 oop class (php) part 2Chap4 oop class (php) part 2
Chap4 oop class (php) part 2
monikadeshmane
 
Chap4 oop class (php) part 1
Chap4 oop class (php) part 1Chap4 oop class (php) part 1
Chap4 oop class (php) part 1
monikadeshmane
 
Chap 3php array part4
Chap 3php array part4Chap 3php array part4
Chap 3php array part4
monikadeshmane
 
Chap 3php array part 3
Chap 3php array part 3Chap 3php array part 3
Chap 3php array part 3
monikadeshmane
 
Chap 3php array part 2
Chap 3php array part 2Chap 3php array part 2
Chap 3php array part 2
monikadeshmane
 
Chap 3php array part1
Chap 3php array part1Chap 3php array part1
Chap 3php array part1
monikadeshmane
 
PHP function
PHP functionPHP function
PHP function
monikadeshmane
 
php string part 4
php string part 4php string part 4
php string part 4
monikadeshmane
 
php string part 3
php string part 3php string part 3
php string part 3
monikadeshmane
 
php string-part 2
php string-part 2php string-part 2
php string-part 2
monikadeshmane
 
PHP string-part 1
PHP string-part 1PHP string-part 1
PHP string-part 1
monikadeshmane
 
java script
java scriptjava script
java script
monikadeshmane
 
ip1clientserver model
 ip1clientserver model ip1clientserver model
ip1clientserver model
monikadeshmane
 
Chap1introppt2php(finally done)
Chap1introppt2php(finally done)Chap1introppt2php(finally done)
Chap1introppt2php(finally done)
monikadeshmane
 
Ad

Recently uploaded (20)

apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
Operations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdfOperations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdf
Arab Academy for Science, Technology and Maritime Transport
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 

Nodejs basics

  • 1. INTRODUCTION TO NODE JS 1 Monica Deshmane(H.V.Desai College, Pune)
  • 2. What we Learn? points Monica Deshmane(H.V.Desai College, Pune) 2.1 Introduction 2.2 What is Node ? 2.3 Traditional Web Server Model 2.4 Node JS Process model
  • 3. Introduction Why node js? Node.js uses asynchronous programming! Ex. a web server opens a file on the server and return the content to the client. Here is how PHP or ASP handles a file request: 1. Sends the task to the computer's file system. 2. Waits till the file system opens and reads the file. 3. Returns the content to the client. Ready to handle the next request. Why node js? Monica Deshmane(H.V.Desai College, Pune)
  • 4. Introduction Here is how Node.js handles a file request: 1. Sends request to the computer's file system. 2. Ready to handle the next request. 3. When the file system has opened and read the file, 4. the server returns the content to the browser. Node.js minimizes the waiting, and simply continues with the next request. Node.js runs single-threaded, non-blocking,non-waiting asynchronously programming, which is very memory efficient. Why node js? Monica Deshmane(H.V.Desai College, Pune)
  • 5. Basics of Node JS What is node js? Node.js is an open source , cross-platform runtime environment for developing server-side applications and networking applications Node.js is free Node.js runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.) Node.js uses JavaScript on the server Node.js was developed by Ryan Dahl in 2009 and its latest version is v0.10.36(now it may vary) What is node js? Monica Deshmane(H.V.Desai College, Pune)
  • 6. Basics of Node JS What Can Node.js Do? Node.js can generate dynamically page contents Node.js can create, open, read, write, delete, and close files i.e perform operations with files on the server Node.js can perform operations on data like, add, delete, modify and collect data from your database What is a Node.js File? Node.js files contain tasks that will be executed on certain events. An event is for trying to access a port on the server Node.js files must be initiated on the server before having any effect Node.js files have extension ".js" What node js does? Monica Deshmane(H.V.Desai College, Pune)
  • 7. Features of Node.js 1. Asynchronous and Event Driven −  All APIs of Node.js library are asynchronous, means, Node.js server not waits for an API to return data.  The server moves to the next API after calling it and a notification mechanism of Events of Node.js helps the server to get a response from the previous API call. 2.Very Fast −  It built on Google Chrome'sV8 JavaScript Engine, so Node.js library is very fast for code execution. 7
  • 8. Features of Node.js(continue..) 3. SingleThreaded but Highly Scalable −  Node.js uses a single threaded model with event looping.  Node.js uses a single threaded program and the same program can provide service to a number of requests than traditional servers like Apache Server. 4. No Buffering −  Node.js applications never buffer any data.  But output the data in chunks. 5. Node.js is released under the MIT license 8
  • 9. (Revise)Features of Node.js  Asynchronous and Event Driven  Very Fast  SingleThreaded but Highly Scalable  No Buffering  License 9
  • 10. Advantages of Node JS 1. Node.js offers an Easy Scalability it easy to scale the applications in horizontal by adding nodes in system and in vertical by adding extra resources to the single nodes . 2. Easy to Learn And light weight framework 3. Node.js is used as a Single Programming Language allows the Node.js developers to write both the front-end as well as the back-end web application in JavaScript using a runtime environment. 4. The Benefit of Fullstack JS It saves both money and time. 5. Known for Offering High Performance The speed of the code execution increased by runtime environment as it supports the non-blocking I/O operations. 6 . The Support of Large and Active Community Advantages Monica Deshmane(H.V.Desai College, Pune)
  • 11. The Drawbacks of Node.js Drawbacks 1. Application Programming Interface (API) is Not Stable 2. not having a Strong Library Support System 3. Asynchronous Programming Model
  • 12. Applications of node js 1.Game developments 2.Designing servers 3.Collaborative work 4.Chatting applications
  • 13. Traditional Web Server Model Process request Monica Deshmane(H.V.Desai College, Pune)
  • 14. Node JS Process model asynchronous web server model using Node.js. Monica Deshmane(H.V.Desai College, Pune)
  • 15. Node JS Process model •Node.js processes user requests differently when compared to a traditional web server model. • Node.js runs in a single process and the application code runs in a single thread and so needs less resources. All the user requests to your web application handled by a single thread and all the I/O work or long running job. So, this single thread doesn't have to wait for the request to complete and is free to handle simultaneousely the next request. If there is no blocking process, node will prepare the response immediately and send it back to client. continue.... Monica Deshmane(H.V.Desai College, Pune)