SlideShare a Scribd company logo
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

PPT
Node js beginner
PDF
Create a RESTful API with NodeJS, Express and MongoDB
PPTX
Create Rest API in Nodejs
PPTX
Introduction to node.js GDD
PDF
Complete MVC on NodeJS
PDF
PDF
All aboard the NodeJS Express
PDF
Node.js and How JavaScript is Changing Server Programming
Node js beginner
Create a RESTful API with NodeJS, Express and MongoDB
Create Rest API in Nodejs
Introduction to node.js GDD
Complete MVC on NodeJS
All aboard the NodeJS Express
Node.js and How JavaScript is Changing Server Programming

What's hot (20)

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

Similar to Node JS | Dilkash Shaikh Mahajan (20)

PPTX
node_js.pptx
PPTX
U4-01-Node JS.pptxweasrdtfyhg[]"Piuytrhedfyguhijokpl
PPTX
Kalp Corporate Node JS Perfect Guide
PDF
PHP Vs NodeJS for Backend Web Development.pdf
PDF
NodeJS for Beginner
PPTX
Node js meetup
PDF
Node Js vs PHP Which One is Perfect for Your Project
KEY
Dcjq node.js presentation
PPTX
Nodejs
DOCX
unit 2 of Full stack web development subject
PPTX
Server Side Web Development Unit 1 of Nodejs.pptx
PPTX
Difference between php and node
PPTX
Intro to Node.js (v1)
PDF
An introduction to Node.js
PPTX
Overview of Node JS
PPTX
node_js.pptx
U4-01-Node JS.pptxweasrdtfyhg[]"Piuytrhedfyguhijokpl
Kalp Corporate Node JS Perfect Guide
PHP Vs NodeJS for Backend Web Development.pdf
NodeJS for Beginner
Node js meetup
Node Js vs PHP Which One is Perfect for Your Project
Dcjq node.js presentation
Nodejs
unit 2 of Full stack web development subject
Server Side Web Development Unit 1 of Nodejs.pptx
Difference between php and node
Intro to Node.js (v1)
An introduction to Node.js
Overview of Node JS
Ad

Recently uploaded (20)

PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PPTX
Fundamentals of Mechanical Engineering.pptx
PDF
PPT on Performance Review to get promotions
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Geodesy 1.pptx...............................................
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPT
Total quality management ppt for engineering students
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Artificial Intelligence
PDF
Categorization of Factors Affecting Classification Algorithms Selection
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
additive manufacturing of ss316l using mig welding
PDF
737-MAX_SRG.pdf student reference guides
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
Fundamentals of Mechanical Engineering.pptx
PPT on Performance Review to get promotions
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
III.4.1.2_The_Space_Environment.p pdffdf
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Geodesy 1.pptx...............................................
CYBER-CRIMES AND SECURITY A guide to understanding
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Total quality management ppt for engineering students
R24 SURVEYING LAB MANUAL for civil enggi
Internet of Things (IOT) - A guide to understanding
Artificial Intelligence
Categorization of Factors Affecting Classification Algorithms Selection
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
additive manufacturing of ss316l using mig welding
737-MAX_SRG.pdf student reference guides

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