Node js for beginners
- 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?
- 5. ● 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++
- 6. 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
- 8. 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
- 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 applications are highly scalable
● Horizontal scaling of servers
● Adding more servers instead of increasing the
performance of each
- 13. 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
- 15. 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.
- 16. 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
- 17. 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.
- 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!
● 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
- 21. References
● Official Node.js Documentation
● Nodeschool.io
● Wikipedia
● Node.js presentation by Gabriele Lana
● Toptal.com,code.tutsplus.com,Google developers