A preliminary study of node js

2,012 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
2,012
On SlideShare
0
From Embeds
0
Number of Embeds
82
Actions
Shares
0
Downloads
50
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

A preliminary study of node js

  1. 1. The First Experience Of 2011-07-29
  2. 2. Topic•••••
  3. 3. JavaScript
  4. 4. The JavaScript Age
  5. 5. The JavaScript Age 2000-2009 LAMP
  6. 6. Browser Wars
  7. 7. JavaScript Engine ...
  8. 8. JavaScript Engine
  9. 9. ••
  10. 10. Web Server••
  11. 11. Server-side JavaScript
  12. 12. Trends
  13. 13. NodeJSJavaScript Node standard library C Node bindings thread event pool loop V8 (libeio) (libev)
  14. 14. Why?
  15. 15. Whatʼs NodeJs ?••••••••
  16. 16. NodeJs Choose?
  17. 17. Google V8 JavaScript Engine • • • •
  18. 18. Evented
  19. 19. Evented
  20. 20. EventedotherThing(); // execute immediately;
  21. 21. Benefits••••
  22. 22. the advantages of Single- threaded performanceNginx(single-thread) vs Apache(multi-thread) http://blog.webfaction.com/a-little-holiday-present
  23. 23. the advantages of Non-blocking Nginx(non-blocking) vs Apache(blocking)
  24. 24. Smaller is Better Smaller is Better 80 60response time (ms) server 40 nginx thin tornado node 20 50 100 150 200 250 300 concurrency
  25. 25. Smaller is Better concurrency=300, Smaller is Better 400 300response time (ms) server nginx 200 thin tornado node_buffer 100 24 26 28 210 212 214 216 218 response size (bytes)
  26. 26. Ajax vs Comet
  27. 27. ••
  28. 28. , ,
  29. 29. CommonJS
  30. 30. CommonJS••••
  31. 31. CommonJS Module••
  32. 32. Module Example
  33. 33. ECMAScript 5
  34. 34. ECMAScript 5••••••
  35. 35. Digg in the node
  36. 36. Getting Starthttps://github.com/joyent/node/wiki/Installation
  37. 37. Node Package Manage
  38. 38. IDE base on nodeIDE base on node http://www.cloud9ide.com/
  39. 39. NodeJS ...•••••
  40. 40. Hello World
  41. 41. NodeJS Modules
  42. 42. Module Types
  43. 43. Rendering HTML - nodejs-dom••
  44. 44. Rendering HTML - nodejs-dom•••
  45. 45. Want to see more?
  46. 46. Demo••••••
  47. 47. YUI3 for NodeJS http://github.com/yui/nodejs-yui3video http://www.yuiblog.com/blog/2010/09/29/video-glass-node/
  48. 48. YUI3var YUI = require("yui3").YUI;YUI().use(*,function(Y){ Y.log(hello jayli!);});
  49. 49. Links••••••

×