SlideShare a Scribd company logo
Hi!
WELCOME MESSAGE
Hello
Everyone
Gobinda Karmakar, MCA,Techno India, Saltlake
I will be showing two of the basic uses of NodeJS apart fromm the
project which I am developing.
6/23/2018 Gobinda Karmakar 2
https://www.facebook.com/gobi.karmakar
https://www.linkedin.com/in/gobinda-karmakar-99584879/
+91 9804880167, gobindak2@gmail.com
Node JS
6/23/2018 Gobinda Karmakar 3
Introduction
created by Ryan Dahl, 2009
• NodeJS is an open source, cross platform
runtime for server side and networking
application.
• Written in C++, and can run on Linux, Mac,
Windows, FreeBSD.
• It uses JavaScript on the server.
6/23/2018 Gobinda Karmakar 4
Features of NodeJS
Extremely fast: Node.js is built on Google Chrome'sV8 JavaScript Engine, so its library is very
fast in code execution.
I/O is Asynchronous and Event Driven: All APIs of Node.js library are asynchronous i.e. non-
blocking. So a Node.js based server never 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. It is also a reason that it is very fast.
Single threaded: Node.js follows a single threaded model with event looping.
Highly Scalable: Node.js is highly scalable because event mechanism helps the server to respond
in a non-blocking way.
No buffering: Node.js cuts down the overall processing time while uploading audio and video
files. Node.js applications never buffer any data.These applications simply output the data in
chunks.
Open source: Node.js has an open source community which has produced many excellent
modules to add additional capabilities to Node.js applications.6/23/2018 Gobinda Karmakar 5
Why NodeJS ?
Easy to build a
scaleable network
program
Event Driven,
Works on the Non-
Blocking Model
Node.JS programs are
executed by V8
Javascript engine the
same used by Google
chrome browser.
Server side JavsScript
Can HandleThousands
Of Concurrent
ConnectionsWith
Minimal Over Head On
A Single Process
Light weight and
efficient
Have Runtime
EnvironmentsAnd
NPM Library
NodeJSWorksWith
NoSQL asWell
6/23/2018 Gobinda Karmakar 6
When to Use ?
• Single page applications (web applications in AJAX, mobile
web applications)Node.js has ability to process many
requests with low response times needed. It is also able to
share things like validations between client and server side,
which makes it a good choice for modern web applications
doing a lot of processing on client side.
Node.js is built on great non-blocking event driven architecture
model. In case your project or module can really make
advantage for this model, then go for it. Some of the cases
could be the following:
6/23/2018 Gobinda Karmakar 7
Anything that requires real-time feedback from
web server such as chat application, messaging
applications or other collaboration tools is good
with Node.js. It will be the best technology for this
type of job. Ruby and Python can do these kind of
features however Node.js will do it exceptionally
great in terms of performance and simplicity of
development.
 Real time web applications:
In case your plan is to build streaming applications
then Node.js is what you need.Traditional web
technologies frequently treat http requests and
responses as atomic events. However, they are
streams and not events. And consequently many
great Node.js applications can be built to take
 Streaming Data:
6/23/2018 Gobinda Karmakar 8
Mobile applications can benefit most out of
it because they consume data mostly via
web services in form of JSON APIs. It’s as
well perfect for taking care of many requests
that are I/O driven (e.g. operations on
database) and scales nicely.
 Building APIs:
6/23/2018 Gobinda Karmakar 9
When Not to Use ?
Simple CRUD/HTML apps: While Node.js will eventually
be a tool for writing all kinds of web applications,
however your application won’t mystically get more
traffic just because you write it in Node.js. If large part of
your application is basically rendering HTML based on
some database, using Node.js will not provide a lot of
business benefits yet.
Enterprise applications: If
you’d like to build an
enterprise application
which requires complex
operations, it’s better to
stick to proven
technologies like JAVA,
Python. Node.js still has a
long way to go and is
considered to be rather
young technology and yet
to prove itself.
Heavy CPU utilizing
applications: It’s not good
using Node.js for
applications that are very
heavy on CPU usage and
very light on actual I/O.
Node.js permits to easily
write C++ add-ons, so you
could certainly use it as a
scripting engine on top of
your algorithms.
NodeJS
6/23/2018 Gobinda Karmakar 10
Lets Start with installation
Pre requisites:
• Go to NodeJS website and download the latest version (https://nodejs.org/en/ )
and install it on your machine
• Windows PowerShell (pre installed on your machine)
we will use it instead of ‘cmd’ because it support ‘ls’ command like we use in Linux Environment
• Atom text editor (https://atom.io/ )
6/23/2018 Gobinda Karmakar 11
Lets Begin with magic
• Make a separate folder for NodeJS practice on your
desktop
• OpenAtom editor
console.log(‘Hello Gobinda’);
save it on your NodeJS folder on your desktop as
hello.js
• Now open upWindows PowerShell and navigate to the
NodeJS folder on your desktop
• Use command
node hello.js
it will display Hello Gobinda on the display window
Creating a separate
environment
6/23/2018 Gobinda Karmakar 13
• Use command ‘npm init’
• And fill the required fields
Now We NeedTo Create A Package i.e
Jason File
6/23/2018 Gobinda Karmakar 14
• This code will create a local server on
your machine
We will be using ES2016 code conventions to
create our server
6/23/2018 Gobinda Karmakar 15
• Type node hello.js to run the created
server
• Go to your browser and type
127.0.0.1:8000
To Run the created server on your machine
6/23/2018 Gobinda Karmakar 16
• Edit the code with fs function i.e.
filesystem
Lets try to load a file
6/23/2018 Gobinda Karmakar 17
• And re run the server and type
127.0.0.1:8000 on
your browser again
Add a simple html page
6/23/2018 Gobinda Karmakar 18
Text editor
Atom
To run the code
A Browser
NodeJS
To power up the server
Windows PowerShell
Graphical Representation
6/23/2018 Gobinda Karmakar 19
Popular apps built on NodeJS
6/23/2018 Gobinda Karmakar 20
A single page web module
OurVery FirstWeb Application
I have attached the full folder along with the ppt please check the folder.
6/23/2018 Gobinda Karmakar 21
THE END
6/23/2018 Gobinda Karmakar 22

More Related Content

What's hot

30 JavaScript optimization tips
30 JavaScript optimization tips30 JavaScript optimization tips
30 JavaScript optimization tips
Hovhannes Avoyan
 
Js revolution donald_derek
Js revolution donald_derekJs revolution donald_derek
Js revolution donald_derek
Donald Derek Haddad
 
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
rtCamp
 
JS digest, March 2017
JS digest, March 2017JS digest, March 2017
JS digest, March 2017
ElifTech
 
In defense of GWT-RPC By Colin Alworth
In defense of GWT-RPC By Colin AlworthIn defense of GWT-RPC By Colin Alworth
In defense of GWT-RPC By Colin Alworth
GWTcon
 
GWT and PWA
GWT and PWAGWT and PWA
Single-page applications and Grails
Single-page applications and GrailsSingle-page applications and Grails
Single-page applications and Grails
Alvaro Sanchez-Mariscal
 
Reactjs workshop (1)
Reactjs workshop (1)Reactjs workshop (1)
Reactjs workshop (1)
Ahmed rebai
 
Node js
Node jsNode js
The Future Is The Cloud
The Future Is The CloudThe Future Is The Cloud
The Future Is The Cloud
Gatsbyjs
 
Best Practices - By Lofi Dewanto
Best Practices - By Lofi DewantoBest Practices - By Lofi Dewanto
Best Practices - By Lofi Dewanto
GWTcon
 
[Srijan Wednesday Webinars] How to Set Up a Node.js Microservices Architectur...
[Srijan Wednesday Webinars] How to Set Up a Node.js Microservices Architectur...[Srijan Wednesday Webinars] How to Set Up a Node.js Microservices Architectur...
[Srijan Wednesday Webinars] How to Set Up a Node.js Microservices Architectur...
Srijan Technologies
 
Developing SPI applications using Grails and AngularJS
Developing SPI applications using Grails and AngularJSDeveloping SPI applications using Grails and AngularJS
Developing SPI applications using Grails and AngularJS
Alvaro Sanchez-Mariscal
 
Pre-render Blazor WebAssembly on static web hosting at publishing time
Pre-render Blazor WebAssembly on static web hosting at publishing timePre-render Blazor WebAssembly on static web hosting at publishing time
Pre-render Blazor WebAssembly on static web hosting at publishing time
Jun-ichi Sakamoto
 
SSR with React - Connecting Next.js with WordPress
SSR with React - Connecting Next.js with WordPressSSR with React - Connecting Next.js with WordPress
SSR with React - Connecting Next.js with WordPress
Imran Sayed
 
GWT Contributor Workshop
GWT Contributor WorkshopGWT Contributor Workshop
GWT Contributor Workshop
Manuel Carrasco Moñino
 
Present and Future of GWT from a developer perspective
Present and Future of GWT from a developer perspectivePresent and Future of GWT from a developer perspective
Present and Future of GWT from a developer perspective
Manuel Carrasco Moñino
 
#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS
Hanoi MagentoMeetup
 
Isomorphic js shared js with react.js
Isomorphic js  shared js with react.jsIsomorphic js  shared js with react.js
Isomorphic js shared js with react.js
Sasha Snig
 
The future of GWT 2.x - By Colin Alworth
The future of GWT 2.x - By Colin AlworthThe future of GWT 2.x - By Colin Alworth
The future of GWT 2.x - By Colin Alworth
GWTcon
 

What's hot (20)

30 JavaScript optimization tips
30 JavaScript optimization tips30 JavaScript optimization tips
30 JavaScript optimization tips
 
Js revolution donald_derek
Js revolution donald_derekJs revolution donald_derek
Js revolution donald_derek
 
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
 
JS digest, March 2017
JS digest, March 2017JS digest, March 2017
JS digest, March 2017
 
In defense of GWT-RPC By Colin Alworth
In defense of GWT-RPC By Colin AlworthIn defense of GWT-RPC By Colin Alworth
In defense of GWT-RPC By Colin Alworth
 
GWT and PWA
GWT and PWAGWT and PWA
GWT and PWA
 
Single-page applications and Grails
Single-page applications and GrailsSingle-page applications and Grails
Single-page applications and Grails
 
Reactjs workshop (1)
Reactjs workshop (1)Reactjs workshop (1)
Reactjs workshop (1)
 
Node js
Node jsNode js
Node js
 
The Future Is The Cloud
The Future Is The CloudThe Future Is The Cloud
The Future Is The Cloud
 
Best Practices - By Lofi Dewanto
Best Practices - By Lofi DewantoBest Practices - By Lofi Dewanto
Best Practices - By Lofi Dewanto
 
[Srijan Wednesday Webinars] How to Set Up a Node.js Microservices Architectur...
[Srijan Wednesday Webinars] How to Set Up a Node.js Microservices Architectur...[Srijan Wednesday Webinars] How to Set Up a Node.js Microservices Architectur...
[Srijan Wednesday Webinars] How to Set Up a Node.js Microservices Architectur...
 
Developing SPI applications using Grails and AngularJS
Developing SPI applications using Grails and AngularJSDeveloping SPI applications using Grails and AngularJS
Developing SPI applications using Grails and AngularJS
 
Pre-render Blazor WebAssembly on static web hosting at publishing time
Pre-render Blazor WebAssembly on static web hosting at publishing timePre-render Blazor WebAssembly on static web hosting at publishing time
Pre-render Blazor WebAssembly on static web hosting at publishing time
 
SSR with React - Connecting Next.js with WordPress
SSR with React - Connecting Next.js with WordPressSSR with React - Connecting Next.js with WordPress
SSR with React - Connecting Next.js with WordPress
 
GWT Contributor Workshop
GWT Contributor WorkshopGWT Contributor Workshop
GWT Contributor Workshop
 
Present and Future of GWT from a developer perspective
Present and Future of GWT from a developer perspectivePresent and Future of GWT from a developer perspective
Present and Future of GWT from a developer perspective
 
#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS
 
Isomorphic js shared js with react.js
Isomorphic js  shared js with react.jsIsomorphic js  shared js with react.js
Isomorphic js shared js with react.js
 
The future of GWT 2.x - By Colin Alworth
The future of GWT 2.x - By Colin AlworthThe future of GWT 2.x - By Colin Alworth
The future of GWT 2.x - By Colin Alworth
 

Similar to Introduction to NodeJS

How open source cross platform as node.js 14 develop runtime applications
How open source cross platform as node.js 14 develop runtime applications How open source cross platform as node.js 14 develop runtime applications
How open source cross platform as node.js 14 develop runtime applications
MoonTechnolabsPvtLtd
 
IDEALIZE 2023 - NodeJS & Firebase Session
IDEALIZE 2023 - NodeJS & Firebase SessionIDEALIZE 2023 - NodeJS & Firebase Session
IDEALIZE 2023 - NodeJS & Firebase Session
Brion Mario
 
All You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfAll You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdf
iDataScientists
 
Why Choose Node.js For Your Next Web Development Project?
Why Choose Node.js For Your Next Web Development Project?Why Choose Node.js For Your Next Web Development Project?
Why Choose Node.js For Your Next Web Development Project?
WeblineIndia
 
NodeJS and what is actually does
NodeJS and what is actually doesNodeJS and what is actually does
NodeJS and what is actually does
Victor Reyes Heitmann
 
Node.js.pdf
Node.js.pdfNode.js.pdf
Node.js.pdf
gulfam ali
 
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdfNode.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
lubnayasminsebl
 
Combining react with node js to develop successful full stack web applications
Combining react with node js to develop successful full stack web applicationsCombining react with node js to develop successful full stack web applications
Combining react with node js to develop successful full stack web applications
Katy Slemon
 
Don’t Let Your Businesses Get Hampered By Large Volume Codes: Nodejs Is Your ...
Don’t Let Your Businesses Get Hampered By Large Volume Codes: Nodejs Is Your ...Don’t Let Your Businesses Get Hampered By Large Volume Codes: Nodejs Is Your ...
Don’t Let Your Businesses Get Hampered By Large Volume Codes: Nodejs Is Your ...
Techahead Software
 
Node.js Web Development .pdf
Node.js Web Development .pdfNode.js Web Development .pdf
Node.js Web Development .pdf
Abanti Aazmin
 
The Positive and Negative Aspects of Node.js Web App Development.pdf
The Positive and Negative Aspects of Node.js Web App Development.pdfThe Positive and Negative Aspects of Node.js Web App Development.pdf
The Positive and Negative Aspects of Node.js Web App Development.pdf
WDP Technologies
 
Top 8 react static site generators for 2020
Top 8 react static site generators for 2020Top 8 react static site generators for 2020
Top 8 react static site generators for 2020
Katy Slemon
 
Nodejs
NodejsNodejs
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web ApplicationReact Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
adityakumar2080
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
Vlad Fedosov
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JSFestUA
 
Node.js Web Development.pdf
Node.js Web Development.pdfNode.js Web Development.pdf
Node.js Web Development.pdf
Sonia Simi
 

Similar to Introduction to NodeJS (20)

How open source cross platform as node.js 14 develop runtime applications
How open source cross platform as node.js 14 develop runtime applications How open source cross platform as node.js 14 develop runtime applications
How open source cross platform as node.js 14 develop runtime applications
 
IDEALIZE 2023 - NodeJS & Firebase Session
IDEALIZE 2023 - NodeJS & Firebase SessionIDEALIZE 2023 - NodeJS & Firebase Session
IDEALIZE 2023 - NodeJS & Firebase Session
 
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
 
All You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfAll You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdf
 
Why Choose Node.js For Your Next Web Development Project?
Why Choose Node.js For Your Next Web Development Project?Why Choose Node.js For Your Next Web Development Project?
Why Choose Node.js For Your Next Web Development Project?
 
NodeJS and what is actually does
NodeJS and what is actually doesNodeJS and what is actually does
NodeJS and what is actually does
 
Node.js.pdf
Node.js.pdfNode.js.pdf
Node.js.pdf
 
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdfNode.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
 
Combining react with node js to develop successful full stack web applications
Combining react with node js to develop successful full stack web applicationsCombining react with node js to develop successful full stack web applications
Combining react with node js to develop successful full stack web applications
 
Don’t Let Your Businesses Get Hampered By Large Volume Codes: Nodejs Is Your ...
Don’t Let Your Businesses Get Hampered By Large Volume Codes: Nodejs Is Your ...Don’t Let Your Businesses Get Hampered By Large Volume Codes: Nodejs Is Your ...
Don’t Let Your Businesses Get Hampered By Large Volume Codes: Nodejs Is Your ...
 
Node.js Web Development .pdf
Node.js Web Development .pdfNode.js Web Development .pdf
Node.js Web Development .pdf
 
The Positive and Negative Aspects of Node.js Web App Development.pdf
The Positive and Negative Aspects of Node.js Web App Development.pdfThe Positive and Negative Aspects of Node.js Web App Development.pdf
The Positive and Negative Aspects of Node.js Web App Development.pdf
 
Top 8 react static site generators for 2020
Top 8 react static site generators for 2020Top 8 react static site generators for 2020
Top 8 react static site generators for 2020
 
Nodejs
NodejsNodejs
Nodejs
 
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web ApplicationReact Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
 
Node.js Web Development.pdf
Node.js Web Development.pdfNode.js Web Development.pdf
Node.js Web Development.pdf
 

Recently uploaded

María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
eCommerce Institute
 
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
0x01 - Newton's Third Law:  Static vs. Dynamic Abusers0x01 - Newton's Third Law:  Static vs. Dynamic Abusers
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
OWASP Beja
 
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
OECD Directorate for Financial and Enterprise Affairs
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
faizulhassanfaiz1670
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Matjaž Lipuš
 
Eureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 PresentationEureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 Presentation
Access Innovations, Inc.
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
Sebastiano Panichella
 
Getting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control TowerGetting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control Tower
Vladimir Samoylov
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
khadija278284
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
Faculty of Medicine And Health Sciences
 
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Orkestra
 
Acorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutesAcorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutes
IP ServerOne
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Sebastiano Panichella
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Access Innovations, Inc.
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
Howard Spence
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Sebastiano Panichella
 

Recently uploaded (16)

María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
 
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
0x01 - Newton's Third Law:  Static vs. Dynamic Abusers0x01 - Newton's Third Law:  Static vs. Dynamic Abusers
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
 
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
 
Eureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 PresentationEureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 Presentation
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
 
Getting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control TowerGetting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control Tower
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
 
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
 
Acorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutesAcorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutes
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
 

Introduction to NodeJS

  • 1. Hi!
  • 2. WELCOME MESSAGE Hello Everyone Gobinda Karmakar, MCA,Techno India, Saltlake I will be showing two of the basic uses of NodeJS apart fromm the project which I am developing. 6/23/2018 Gobinda Karmakar 2 https://www.facebook.com/gobi.karmakar https://www.linkedin.com/in/gobinda-karmakar-99584879/ +91 9804880167, gobindak2@gmail.com
  • 4. Introduction created by Ryan Dahl, 2009 • NodeJS is an open source, cross platform runtime for server side and networking application. • Written in C++, and can run on Linux, Mac, Windows, FreeBSD. • It uses JavaScript on the server. 6/23/2018 Gobinda Karmakar 4
  • 5. Features of NodeJS Extremely fast: Node.js is built on Google Chrome'sV8 JavaScript Engine, so its library is very fast in code execution. I/O is Asynchronous and Event Driven: All APIs of Node.js library are asynchronous i.e. non- blocking. So a Node.js based server never 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. It is also a reason that it is very fast. Single threaded: Node.js follows a single threaded model with event looping. Highly Scalable: Node.js is highly scalable because event mechanism helps the server to respond in a non-blocking way. No buffering: Node.js cuts down the overall processing time while uploading audio and video files. Node.js applications never buffer any data.These applications simply output the data in chunks. Open source: Node.js has an open source community which has produced many excellent modules to add additional capabilities to Node.js applications.6/23/2018 Gobinda Karmakar 5
  • 6. Why NodeJS ? Easy to build a scaleable network program Event Driven, Works on the Non- Blocking Model Node.JS programs are executed by V8 Javascript engine the same used by Google chrome browser. Server side JavsScript Can HandleThousands Of Concurrent ConnectionsWith Minimal Over Head On A Single Process Light weight and efficient Have Runtime EnvironmentsAnd NPM Library NodeJSWorksWith NoSQL asWell 6/23/2018 Gobinda Karmakar 6
  • 7. When to Use ? • Single page applications (web applications in AJAX, mobile web applications)Node.js has ability to process many requests with low response times needed. It is also able to share things like validations between client and server side, which makes it a good choice for modern web applications doing a lot of processing on client side. Node.js is built on great non-blocking event driven architecture model. In case your project or module can really make advantage for this model, then go for it. Some of the cases could be the following: 6/23/2018 Gobinda Karmakar 7
  • 8. Anything that requires real-time feedback from web server such as chat application, messaging applications or other collaboration tools is good with Node.js. It will be the best technology for this type of job. Ruby and Python can do these kind of features however Node.js will do it exceptionally great in terms of performance and simplicity of development.  Real time web applications: In case your plan is to build streaming applications then Node.js is what you need.Traditional web technologies frequently treat http requests and responses as atomic events. However, they are streams and not events. And consequently many great Node.js applications can be built to take  Streaming Data: 6/23/2018 Gobinda Karmakar 8
  • 9. Mobile applications can benefit most out of it because they consume data mostly via web services in form of JSON APIs. It’s as well perfect for taking care of many requests that are I/O driven (e.g. operations on database) and scales nicely.  Building APIs: 6/23/2018 Gobinda Karmakar 9
  • 10. When Not to Use ? Simple CRUD/HTML apps: While Node.js will eventually be a tool for writing all kinds of web applications, however your application won’t mystically get more traffic just because you write it in Node.js. If large part of your application is basically rendering HTML based on some database, using Node.js will not provide a lot of business benefits yet. Enterprise applications: If you’d like to build an enterprise application which requires complex operations, it’s better to stick to proven technologies like JAVA, Python. Node.js still has a long way to go and is considered to be rather young technology and yet to prove itself. Heavy CPU utilizing applications: It’s not good using Node.js for applications that are very heavy on CPU usage and very light on actual I/O. Node.js permits to easily write C++ add-ons, so you could certainly use it as a scripting engine on top of your algorithms. NodeJS 6/23/2018 Gobinda Karmakar 10
  • 11. Lets Start with installation Pre requisites: • Go to NodeJS website and download the latest version (https://nodejs.org/en/ ) and install it on your machine • Windows PowerShell (pre installed on your machine) we will use it instead of ‘cmd’ because it support ‘ls’ command like we use in Linux Environment • Atom text editor (https://atom.io/ ) 6/23/2018 Gobinda Karmakar 11
  • 13. • Make a separate folder for NodeJS practice on your desktop • OpenAtom editor console.log(‘Hello Gobinda’); save it on your NodeJS folder on your desktop as hello.js • Now open upWindows PowerShell and navigate to the NodeJS folder on your desktop • Use command node hello.js it will display Hello Gobinda on the display window Creating a separate environment 6/23/2018 Gobinda Karmakar 13
  • 14. • Use command ‘npm init’ • And fill the required fields Now We NeedTo Create A Package i.e Jason File 6/23/2018 Gobinda Karmakar 14
  • 15. • This code will create a local server on your machine We will be using ES2016 code conventions to create our server 6/23/2018 Gobinda Karmakar 15
  • 16. • Type node hello.js to run the created server • Go to your browser and type 127.0.0.1:8000 To Run the created server on your machine 6/23/2018 Gobinda Karmakar 16
  • 17. • Edit the code with fs function i.e. filesystem Lets try to load a file 6/23/2018 Gobinda Karmakar 17
  • 18. • And re run the server and type 127.0.0.1:8000 on your browser again Add a simple html page 6/23/2018 Gobinda Karmakar 18
  • 19. Text editor Atom To run the code A Browser NodeJS To power up the server Windows PowerShell Graphical Representation 6/23/2018 Gobinda Karmakar 19
  • 20. Popular apps built on NodeJS 6/23/2018 Gobinda Karmakar 20
  • 21. A single page web module OurVery FirstWeb Application I have attached the full folder along with the ppt please check the folder. 6/23/2018 Gobinda Karmakar 21