SlideShare a Scribd company logo
1 of 12
Download to read offline
NodeJS
- Dilkash Shaikh Mahajan
Anjuman College of Engineering and Technology, Nagpur.
+91 9325696751
Contents
 Introduction
 Advantages
 Applications
 Why We Are Used NodeJS(Pictorial)
 Difference Between PHP and NodeJS
 Modules
 Path
 OS
 File System
By Dilkash Shaikh Mahajan
Introduction
 Node.js is a runtime environment that includes everything that is needed to execute a
program that is written in JavaScript.
 Node.js runs the V8 JavaScript engine, the core of Google Chrome, outside of the
browser. This allows Node.js to be very performant.
 A Node.js app is run in a single process, without creating a new thread for every
request.
 Node.js provides a set of asynchronous I/O primitives in its standard library that
prevent JavaScript code from blocking and generally, libraries in Node.js are written
using non-blocking paradigms, making blocking behavior the exception rather than
the norm.
By Dilkash Shaikh Mahajan
How To Find The Current Version.
By Dilkash Shaikh Mahajan
Advantages
 Easy to Learn.
 Fast Backend Solution.
 Scalability.
 Community.
 High Performance.
 Caching.
By Dilkash Shaikh Mahajan
Applications
 Real-time Web Applications
 Streaming Applications
 Messaging Apps
 Chat Programs
 Social Media Apps
 Virtual Emulators
 Multiplayer Games
 Collaboration Tools
 API
By Dilkash Shaikh Mahajan
Why We Are Used NodeJS(Pictorial)
By Dilkash Shaikh Mahajan
Difference Between PHP and NodeJS
Features PHP NodeJS
Runtime Environment PHP has a ready to install feature to use
it on the server side
Node.js is a runtime environment for
JavaScript on the server side.
Powered by two engines PHP is powered by Zend engines Node.js is powered by Google’s V8
JavaScript engine
Complexity of use PHP is much simpler to use compared
to Node.js.
Node.js is not too complex to use but
requires more lines of coding and basic
understanding of closures and callback
functions
Execution PHP is synchronous Node.js is asynchronous
Execution Speed PHP is slower than Node.js Faster than PHP and also light weight
compared to PHP.
Web Server PHP runs on the Apache web server. It
can also run on IIS web server in case
of a windows machine.
NPM does not need a web server, it runs on
its own run time environment.
Package Manager Composer package manager is widely
used.
Node Package Manager (NPM) is widely
used.
 PATH Modules
The Path Module Provides Utilities For Working With File And Directory Paths. It can be accessed using:
const path = require('path');
 path.basename(path):-
The path.basename() method returns the last portion of a path, similar to the Unix basename command.
 path.dirname(path):-
The path.dirname() method returns the directory name of a path, similar to the Unix dirname command.
 path.extname(path):-
The path.extname() method returns the extension of the path, from the last occurrence of the .
 path.isabsolute(path):-
The path.isAbsolute() method determines if path is an absolute path. If the given path is a zero-length
string, false will be returned.
 path.parse(path):-
The path.parse() method returns an object whose properties represent significant elements of the path.
By Dilkash Shaikh Mahajan
 OS Modules
The OS Module Provides Operating System-related Utility Methods And Properties. It Can Be Accessed Using:
const os = require(‘os’);
 os.arch():-
Returns the operating system CPU architecture for which the Node.js binary was compiled.
 os.homedir():-
Returns the string path of the current user's home directory.
 os.hostname():-
Returns the host name of the operating system as a string.
 os.version():-
Returns a string identifying the kernel version.
 os.platform():-
Returns a string identifying the operating system platform. The value is set at compile time.
By Dilkash Shaikh Mahajan
 fs.appendFile(path, data[options], callback)
Asynchronously append data to a file, creating the file if it does not yet exist.
 fs.mkdir(path[options], callback)
Asynchronously creates a directory.
 fs.readFile(path[options], encoding, callback)
Returns the host name of the operating system as a string.
 fs.rename(oldPath, newPath, callback)
Asynchronously rename file at oldPath to the pathname provided as newPath. In the case
that newPath already exists, it will be overwritten.
 fs.writeFile(file, data[, options], callback)
When file is a filename, asynchronously writes data to the file, replacing the file if it already
exists. data can be a string or a buffer.
 FILE SYSTEM Modules
The fs module enables interacting with the file system in a way modeled on standard POSIX functions. We are see
asynchronous way.
const fs = require(‘fs’);
By Dilkash Shaikh Mahajan
Thank You.
By Dilkash Shaikh Mahajan

More Related Content

What's hot

Aleksandr_Butenko_Mobile_Development
Aleksandr_Butenko_Mobile_DevelopmentAleksandr_Butenko_Mobile_Development
Aleksandr_Butenko_Mobile_Development
Ciklum
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejs
Amit Thakkar
 
Introduction to Mesos
Introduction to MesosIntroduction to Mesos
Introduction to Mesos
koboltmarky
 
What I learned from FluentConf and then some
What I learned from FluentConf and then someWhat I learned from FluentConf and then some
What I learned from FluentConf and then some
Ohad Kravchick
 
Shell Tips & Tricks
Shell Tips & TricksShell Tips & Tricks
Shell Tips & Tricks
MongoDB
 
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
Tom Croucher
 
Mastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript ShellMastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript Shell
Scott Hernandez
 

What's hot (20)

Aleksandr_Butenko_Mobile_Development
Aleksandr_Butenko_Mobile_DevelopmentAleksandr_Butenko_Mobile_Development
Aleksandr_Butenko_Mobile_Development
 
NodeJS Concurrency
NodeJS ConcurrencyNodeJS Concurrency
NodeJS Concurrency
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejs
 
NodeJs Session02
NodeJs Session02NodeJs Session02
NodeJs Session02
 
Introduction to Mesos
Introduction to MesosIntroduction to Mesos
Introduction to Mesos
 
Functional Hostnames and Why they are Bad
Functional Hostnames and Why they are BadFunctional Hostnames and Why they are Bad
Functional Hostnames and Why they are Bad
 
Node.js Workshop - Sela SDP 2015
Node.js Workshop  - Sela SDP 2015Node.js Workshop  - Sela SDP 2015
Node.js Workshop - Sela SDP 2015
 
What I learned from FluentConf and then some
What I learned from FluentConf and then someWhat I learned from FluentConf and then some
What I learned from FluentConf and then some
 
Shell Tips & Tricks
Shell Tips & TricksShell Tips & Tricks
Shell Tips & Tricks
 
ExpressJs Session01
ExpressJs Session01ExpressJs Session01
ExpressJs Session01
 
Node.js - A Quick Tour
Node.js - A Quick TourNode.js - A Quick Tour
Node.js - A Quick Tour
 
Introduction to Node.js: What, why and how?
Introduction to Node.js: What, why and how?Introduction to Node.js: What, why and how?
Introduction to Node.js: What, why and how?
 
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
 
Teched 2012 就是为了改变脚本世界
Teched 2012 就是为了改变脚本世界Teched 2012 就是为了改变脚本世界
Teched 2012 就是为了改变脚本世界
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
 
Node36
Node36Node36
Node36
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...
 
Mastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript ShellMastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript Shell
 
Creating a Mesos python framework
Creating a Mesos python frameworkCreating a Mesos python framework
Creating a Mesos python framework
 
Nsq & python worker
Nsq & python workerNsq & python worker
Nsq & python worker
 

Similar to Node JS | Dilkash Shaikh Mahajan

Similar to Node JS | Dilkash Shaikh Mahajan (20)

NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginners
 
Node js Introduction
Node js IntroductionNode js Introduction
Node js Introduction
 
Top 30 Node.js interview questions
Top 30 Node.js interview questionsTop 30 Node.js interview questions
Top 30 Node.js interview questions
 
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 Node.JS
Introduction to Node.JSIntroduction to Node.JS
Introduction to Node.JS
 
Introducing Node.js in an Oracle technology environment (including hands-on)
Introducing Node.js in an Oracle technology environment (including hands-on)Introducing Node.js in an Oracle technology environment (including hands-on)
Introducing Node.js in an Oracle technology environment (including hands-on)
 
node.js.pptx
node.js.pptxnode.js.pptx
node.js.pptx
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Nodejs
NodejsNodejs
Nodejs
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
 
Kalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect GuideKalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect Guide
 
Javascript Basic RESTful
Javascript Basic RESTfulJavascript Basic RESTful
Javascript Basic RESTful
 
ASP.NET vNext
ASP.NET vNextASP.NET vNext
ASP.NET vNext
 
Building Applications With the MEAN Stack
Building Applications With the MEAN StackBuilding Applications With the MEAN Stack
Building Applications With the MEAN Stack
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Node J pdf.docx
Node J pdf.docxNode J pdf.docx
Node J pdf.docx
 
Node J pdf.docx
Node J pdf.docxNode J pdf.docx
Node J pdf.docx
 
Exploring Node.jS
Exploring Node.jSExploring Node.jS
Exploring Node.jS
 
Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...
Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...
Meetup RomaJS - introduzione interattiva a Node.js - Luca Lanziani - Codemoti...
 
Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6
 

Recently uploaded

Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Recently uploaded (20)

Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 

Node JS | Dilkash Shaikh Mahajan

  • 1. NodeJS - Dilkash Shaikh Mahajan Anjuman College of Engineering and Technology, Nagpur. +91 9325696751
  • 2. Contents  Introduction  Advantages  Applications  Why We Are Used NodeJS(Pictorial)  Difference Between PHP and NodeJS  Modules  Path  OS  File System By Dilkash Shaikh Mahajan
  • 3. Introduction  Node.js is a runtime environment that includes everything that is needed to execute a program that is written in JavaScript.  Node.js runs the V8 JavaScript engine, the core of Google Chrome, outside of the browser. This allows Node.js to be very performant.  A Node.js app is run in a single process, without creating a new thread for every request.  Node.js provides a set of asynchronous I/O primitives in its standard library that prevent JavaScript code from blocking and generally, libraries in Node.js are written using non-blocking paradigms, making blocking behavior the exception rather than the norm. By Dilkash Shaikh Mahajan
  • 4. How To Find The Current Version. By Dilkash Shaikh Mahajan
  • 5. Advantages  Easy to Learn.  Fast Backend Solution.  Scalability.  Community.  High Performance.  Caching. By Dilkash Shaikh Mahajan
  • 6. Applications  Real-time Web Applications  Streaming Applications  Messaging Apps  Chat Programs  Social Media Apps  Virtual Emulators  Multiplayer Games  Collaboration Tools  API By Dilkash Shaikh Mahajan
  • 7. Why We Are Used NodeJS(Pictorial) By Dilkash Shaikh Mahajan
  • 8. Difference Between PHP and NodeJS Features PHP NodeJS Runtime Environment PHP has a ready to install feature to use it on the server side Node.js is a runtime environment for JavaScript on the server side. Powered by two engines PHP is powered by Zend engines Node.js is powered by Google’s V8 JavaScript engine Complexity of use PHP is much simpler to use compared to Node.js. Node.js is not too complex to use but requires more lines of coding and basic understanding of closures and callback functions Execution PHP is synchronous Node.js is asynchronous Execution Speed PHP is slower than Node.js Faster than PHP and also light weight compared to PHP. Web Server PHP runs on the Apache web server. It can also run on IIS web server in case of a windows machine. NPM does not need a web server, it runs on its own run time environment. Package Manager Composer package manager is widely used. Node Package Manager (NPM) is widely used.
  • 9.  PATH Modules The Path Module Provides Utilities For Working With File And Directory Paths. It can be accessed using: const path = require('path');  path.basename(path):- The path.basename() method returns the last portion of a path, similar to the Unix basename command.  path.dirname(path):- The path.dirname() method returns the directory name of a path, similar to the Unix dirname command.  path.extname(path):- The path.extname() method returns the extension of the path, from the last occurrence of the .  path.isabsolute(path):- The path.isAbsolute() method determines if path is an absolute path. If the given path is a zero-length string, false will be returned.  path.parse(path):- The path.parse() method returns an object whose properties represent significant elements of the path. By Dilkash Shaikh Mahajan
  • 10.  OS Modules The OS Module Provides Operating System-related Utility Methods And Properties. It Can Be Accessed Using: const os = require(‘os’);  os.arch():- Returns the operating system CPU architecture for which the Node.js binary was compiled.  os.homedir():- Returns the string path of the current user's home directory.  os.hostname():- Returns the host name of the operating system as a string.  os.version():- Returns a string identifying the kernel version.  os.platform():- Returns a string identifying the operating system platform. The value is set at compile time. By Dilkash Shaikh Mahajan
  • 11.  fs.appendFile(path, data[options], callback) Asynchronously append data to a file, creating the file if it does not yet exist.  fs.mkdir(path[options], callback) Asynchronously creates a directory.  fs.readFile(path[options], encoding, callback) Returns the host name of the operating system as a string.  fs.rename(oldPath, newPath, callback) Asynchronously rename file at oldPath to the pathname provided as newPath. In the case that newPath already exists, it will be overwritten.  fs.writeFile(file, data[, options], callback) When file is a filename, asynchronously writes data to the file, replacing the file if it already exists. data can be a string or a buffer.  FILE SYSTEM Modules The fs module enables interacting with the file system in a way modeled on standard POSIX functions. We are see asynchronous way. const fs = require(‘fs’); By Dilkash Shaikh Mahajan
  • 12. Thank You. By Dilkash Shaikh Mahajan