S Arjun
S4 BCA
Amrita University,Kollam
ā˜… Javascript & the V8 Engine
ā˜… Intro to node js
ā˜… Features of Node js
ā˜… Examples of Node js
ā˜… Node js in the industry
ā˜… How to install
ā˜… NPM
ā˜… Hello world
ā˜… Frameworks and Extensions
ā˜… Future learning
ā˜… References
What’s going to be covered?
javascript
ā— Browser side programming
ā— Event handling on the client side
ā— Adding interactivity to web pages
Google v8
javascript Engine
ā— v8 is a super fast javascript library built by google for
chrome
ā— Compiles javascript directly into machine code instead of
interpreting
ā— JIT(Just In Time ) compilation
ā— Written in c++
what the js is node?
ā— Node.js = javascript +google v8 on the
server
ā— Additional features for javascript to run on
the server
ā— Handle server side events
ā— Cross operating system compatible
What makes node better?
Event driven
ā— Just like javascript events on the client,Node can
handle various events on the server
ā— Examples of server events are,file transfer,request
for a page,loading content from database
Non blocking I/O
ā— Traditional applications waits for a set code to
complete before it displays the content.This is called
blocking code
ā— in non blocking Once the request is made we
continue on to the next line of code before waiting
for the time consuming request to finish
ā— Uses callback functions to handle non blocking
code
Scalable
ā— Node applications are highly scalable
ā— Horizontal scaling of servers
ā— Adding more servers instead of increasing the
performance of each
what we can make with node?
ā— Real time chat applications
ā— Upload huge amounts of data
ā— Data streaming applications
ā— Distributed ,clustered systems and embedded systems
ā— Applications that can handle millions of concurrent
connections .
ā— Control Robots and drones through WLAN
who uses node.js
And many more...
A little bit of History
ā— Node.js was invented in 2009 by Ryan Dahl
ā— inspired to create Node.js after seeing a file
upload progress bar on Flickr
ā— Opensource,sponsored by Joyent and
microsoft
ā— Ryan was a mathematics student and
dropped out of college.
Installing node.js
ā— for windows download the exe
https://nodejs.org/download/
ā— On linux just type
sudo apt-get install nodejs
sudo apt-get install npm
NPM node package manager
ā— Node package manager(NPM) is a component of node
js
ā— NPM fetches packages just like apt-get in ubuntu
ā— Packages are plugins or commonly used modules that
add more functions to node.Just like beans in java
ā— NPM manages the dependency of the packages.
HELLO world!
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
console.log("The server just go a request");
res.write("Hello world");
res.end();
}).listen(9615);
FRAMEWORKS & EXTENSIONS
ā— Express.js web application framework similar to python django or ruby
on rails
ā— Cyclon.js Building WLAN/internet controlled robots and drones using
node.js
ā— Sails.js MVC web application frameworks
ā— Socketstream Real Time applications .
Moving ahead!
ā— The best way to learn node is to use and
interactive tutorial called nodeschool
ā— Available as an Npm package :
npm install -g learnyounode
ā— Official node.js documentation
References
ā— Official Node.js Documentation
ā— Nodeschool.io
ā— Wikipedia
ā— Node.js presentation by Gabriele Lana
ā— Toptal.com,code.tutsplus.com,Google developers
THANK YOU

Node js for beginners

  • 1.
    S Arjun S4 BCA AmritaUniversity,Kollam
  • 2.
    ā˜… Javascript &the V8 Engine ā˜… Intro to node js ā˜… Features of Node js ā˜… Examples of Node js ā˜… Node js in the industry ā˜… How to install ā˜… NPM ā˜… Hello world ā˜… Frameworks and Extensions ā˜… Future learning ā˜… References What’s going to be covered?
  • 3.
    javascript ā— Browser sideprogramming ā— Event handling on the client side ā— Adding interactivity to web pages
  • 4.
  • 5.
    ā— v8 isa super fast javascript library built by google for chrome ā— Compiles javascript directly into machine code instead of interpreting ā— JIT(Just In Time ) compilation ā— Written in c++
  • 6.
    what the jsis node? ā— Node.js = javascript +google v8 on the server ā— Additional features for javascript to run on the server ā— Handle server side events ā— Cross operating system compatible
  • 7.
  • 8.
    Event driven ā— Justlike javascript events on the client,Node can handle various events on the server ā— Examples of server events are,file transfer,request for a page,loading content from database
  • 10.
    Non blocking I/O ā—Traditional applications waits for a set code to complete before it displays the content.This is called blocking code ā— in non blocking Once the request is made we continue on to the next line of code before waiting for the time consuming request to finish ā— Uses callback functions to handle non blocking code
  • 11.
    Scalable ā— Node applicationsare highly scalable ā— Horizontal scaling of servers ā— Adding more servers instead of increasing the performance of each
  • 13.
    what we canmake with node? ā— Real time chat applications ā— Upload huge amounts of data ā— Data streaming applications ā— Distributed ,clustered systems and embedded systems ā— Applications that can handle millions of concurrent connections . ā— Control Robots and drones through WLAN
  • 14.
  • 15.
    A little bitof History ā— Node.js was invented in 2009 by Ryan Dahl ā— inspired to create Node.js after seeing a file upload progress bar on Flickr ā— Opensource,sponsored by Joyent and microsoft ā— Ryan was a mathematics student and dropped out of college.
  • 16.
    Installing node.js ā— forwindows download the exe https://nodejs.org/download/ ā— On linux just type sudo apt-get install nodejs sudo apt-get install npm
  • 17.
    NPM node packagemanager ā— Node package manager(NPM) is a component of node js ā— NPM fetches packages just like apt-get in ubuntu ā— Packages are plugins or commonly used modules that add more functions to node.Just like beans in java ā— NPM manages the dependency of the packages.
  • 18.
    HELLO world! var http= require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); console.log("The server just go a request"); res.write("Hello world"); res.end(); }).listen(9615);
  • 19.
    FRAMEWORKS & EXTENSIONS ā—Express.js web application framework similar to python django or ruby on rails ā— Cyclon.js Building WLAN/internet controlled robots and drones using node.js ā— Sails.js MVC web application frameworks ā— Socketstream Real Time applications .
  • 20.
    Moving ahead! ā— Thebest way to learn node is to use and interactive tutorial called nodeschool ā— Available as an Npm package : npm install -g learnyounode ā— Official node.js documentation
  • 21.
    References ā— Official Node.jsDocumentation ā— Nodeschool.io ā— Wikipedia ā— Node.js presentation by Gabriele Lana ā— Toptal.com,code.tutsplus.com,Google developers
  • 22.