Node.jsHP.com Brown Bag Session      15 Feb 2012          Alif
What?!    Server-side javascript Built on top of Chrome V8 –   insanely fast, and getting better every dayhttp://code.goog...
Some facts..       Not a web framework..    Non blocking I/O – event loopNot written in javascript itself. It’s in C.     ...
WhyNodes goal is to provide an easy way to build scalable network          programs.
HowKeep slow operations fromblocking other operations.
Traditional I/Ovar data = file.read(file.txt);  doSomethingWith(data);Something is not right here
FAIL !var data = file.read(file.txt);    // zzzZZzzz … …. … . . .  doSomethingWith(data); Don’t waste those cycles!
Async I/Ofile.read(file.txt, function(data) {      doSomethingWith(data);                   });        doSomethingElse(); ...
Seriously, why javascript though :/    De facto standard language for web                programming     do not underestim...
Nodejs is…                - Immature  - Not yet proven at large scale code size                         Interesting readin...
Best use for..           JSON APIs –       heavy ajax call consumption       Streaming data –     parsing file uploads in ...
Who use it                Real world app,https://github.com/joyent/node/wiki/Projects,-    Applications,-and-Companies-Usi...
The beauty of Node is that you can writeentirely simple and mundane JavaScript to get                 these results.
Node Modules  NPM – Node package manager    http://search.npmjs.org/ C: npm install express jade stylusOr, define it in pa...
{ live demo session }Stalk here for more gossips:      http://nodejs.org   http://howtonode.org
Upcoming SlideShare
Loading in …5
×

Node.js

1,082 views

Published on

Mohd Alif Abdul Aziz
@h4ck4life

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,082
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
9
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Node.js

  1. 1. Node.jsHP.com Brown Bag Session 15 Feb 2012 Alif
  2. 2. What?! Server-side javascript Built on top of Chrome V8 – insanely fast, and getting better every dayhttp://code.google.com/p/v8/ C: node server.js
  3. 3. Some facts.. Not a web framework.. Non blocking I/O – event loopNot written in javascript itself. It’s in C. Javascript is only, Function Object Number String Array Wasn’t designed for TCP / network stuff by nature
  4. 4. WhyNodes goal is to provide an easy way to build scalable network programs.
  5. 5. HowKeep slow operations fromblocking other operations.
  6. 6. Traditional I/Ovar data = file.read(file.txt); doSomethingWith(data);Something is not right here
  7. 7. FAIL !var data = file.read(file.txt); // zzzZZzzz … …. … . . . doSomethingWith(data); Don’t waste those cycles!
  8. 8. Async I/Ofile.read(file.txt, function(data) { doSomethingWith(data); }); doSomethingElse(); WIN ! No need to wait for the disk, do something else meanwhile!
  9. 9. Seriously, why javascript though :/ De facto standard language for web programming do not underestimate javascript, https://github.com/languages
  10. 10. Nodejs is… - Immature - Not yet proven at large scale code size Interesting reading: http://teddziuba.com/2011/10/node-js-is-cancer.htmlits opaque and weird to most but completely usable for a small group
  11. 11. Best use for.. JSON APIs – heavy ajax call consumption Streaming data – parsing file uploads in real timeSoft Realtime Applications – chat/IM, twitter, realtime scoreboards
  12. 12. Who use it Real world app,https://github.com/joyent/node/wiki/Projects,- Applications,-and-Companies-Using-Node .. growing rapidly each days
  13. 13. The beauty of Node is that you can writeentirely simple and mundane JavaScript to get these results.
  14. 14. Node Modules NPM – Node package manager http://search.npmjs.org/ C: npm install express jade stylusOr, define it in package.json format, Then just hit npm install
  15. 15. { live demo session }Stalk here for more gossips: http://nodejs.org http://howtonode.org

×