0
Nodejs How To?nodejs.org
Where do we use it?●   Yahoo Proxy Feed●   XML Api●   IP2Country Service●   IP Spam Cop●   Skitto●   RTB Serving
We Started with an evilvar http = require(http);http.createServer(function (req, res) { res.writeHead(200, {Content-Type: ...
DONT CALL ME A WEBSERVERWhy??Coz I Can even answer what 1+1 is :PIm a platform with event-driven, non-blocking I/O for N/W...
ARCHITECTURE
LOOP IS MY LIFEI have only one worker [Single Threaded]He runs in an Event Loop  ● A Loop over a queue of events to be pro...
AM I ASYNC?Ya people do believe so ;)Scenarios  ● I/O  ● setInterval  ● setTimeout  ● process.nextTick
Quick Demo
Programming in NodePrerequisites  ●   Deeper understanding of javascript closures and this [We take      it for granted :P...
Nodejs Module System ●   Inherits Common JS module system ●   All you require is the cached module.exports object ●   You ...
npm●   npm !== Node Package Manager [npm is not an acronym    (ninaa) - may be ;)]●   If maven is for java then npm is for...
Is coding asynchronous way hard?We had no choice and we were left in the state below :P
Patterns and Antipatterns??PS: All Javascript Patterns and Antipatterns apply ;)
Debugging + Monitoring :(Trust us, It is harder than developing an App :)
Overview           Questions !!!!!!
Upcoming SlideShare
Loading in...5
×

Node ppt

5,102

Published on

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

No Downloads
Views
Total Views
5,102
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
103
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Node ppt"

  1. 1. Nodejs How To?nodejs.org
  2. 2. Where do we use it?● Yahoo Proxy Feed● XML Api● IP2Country Service● IP Spam Cop● Skitto● RTB Serving
  3. 3. We Started with an evilvar http = require(http);http.createServer(function (req, res) { res.writeHead(200, {Content-Type: text/plain}); res.end(Hello World );}).listen(1337, 127.0.0.1);console.log(Server running at http://127.0.0.1:1337/);
  4. 4. DONT CALL ME A WEBSERVERWhy??Coz I Can even answer what 1+1 is :PIm a platform with event-driven, non-blocking I/O for N/W applicationdevelopmentUsing Node as a Server that responds to HTTP requests is a use case :)
  5. 5. ARCHITECTURE
  6. 6. LOOP IS MY LIFEI have only one worker [Single Threaded]He runs in an Event Loop ● A Loop over a queue of events to be processed ● Event Loop !== setIntervalHe serves the events via callbacks and Dont dare to block him, thenI will the shift to state of coma ;)
  7. 7. AM I ASYNC?Ya people do believe so ;)Scenarios ● I/O ● setInterval ● setTimeout ● process.nextTick
  8. 8. Quick Demo
  9. 9. Programming in NodePrerequisites ● Deeper understanding of javascript closures and this [We take it for granted :P] ● Nodes async behaviour ● Nodes module system & npm [He is the one :)]
  10. 10. Nodejs Module System ● Inherits Common JS module system ● All you require is the cached module.exports object ● You have a lots of options to locate
  11. 11. npm● npm !== Node Package Manager [npm is not an acronym (ninaa) - may be ;)]● If maven is for java then npm is for node● npm + package.json + modules The way to write node app :)
  12. 12. Is coding asynchronous way hard?We had no choice and we were left in the state below :P
  13. 13. Patterns and Antipatterns??PS: All Javascript Patterns and Antipatterns apply ;)
  14. 14. Debugging + Monitoring :(Trust us, It is harder than developing an App :)
  15. 15. Overview Questions !!!!!!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×