Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

(C)NodeJS

2,228 views

Published on

NodeJS和NodeJS在中国

Published in: Technology, Design

(C)NodeJS

  1. 1. NodeJS和NodeJS在中国
  2. 2.  @朴灵 #Front-end Engineer# #Mobile Web App# #V5# #NodeJS# #EventProxy#
  3. 3.  What’s NodeJS Why NodeJS How to use NodeJS Who uses NodeJS CNodeJS(NodeJS in China)
  4. 4. Ryan Dahl
  5. 5. Evented I/O for V8 JavaScriptGoal:Provide an easy way to buildscalable network programs
  6. 6.  May 2009, initial release November 2011, v0.6 v0.8 in Roadmap 5000+ modules/libraries in NPM
  7. 7. Why? Ruby??? PythonJava ASP.NET PHP
  8. 8.  Events Non-Blocking I/O JavaScript & V8  浏览器战争 Single thread
  9. 9. Ads 勋章Timeline Topics
  10. 10. m+n max(m, n)
  11. 11. m+n+x max(m + n +y + … + x + y + …)
  12. 12.  …… $timeline = get_timeline(); $ads = get_ads(); $badages = get_badages(); ……
  13. 13.  get_timeline(function (timeline){ // TODO }); get_ads(function (ads){ // TODO }); get_badages(function (badages){ // TODO });
  14. 14.  HTTP/HTTPS TCP/UDP DNS File System Stream Child Process …
  15. 15.  JavaScript at Frontend and Backend both  代码复用  经验共享 JavaScript Anywhere  CLI  Web Server  TCP Server  GUI(Webkit)
  16. 16. Any application that canbe written in JavaScript,will eventually be writtenin JavaScript
  17. 17.  Prerequisites  make  wget  gcc/g++  Python(2.6 <= version <3.0)  Libssl-dev
  18. 18.  wget http://nodejs.org/dist/v0.6.1/node-v0.6.1.tar.gz tar zxvf node-v0.6.1.tar.gz cd node-v0.6.1 ./configure make make install
  19. 19.  curl http://npmjs.org/install.sh | sh npm install express
  20. 20. var http = require(http);http.createServer(function (req, res) { res.writeHead(200, {Content-Type: text/plain}); res.end(Hello Worldn);}).listen(1337, "127.0.0.1");console.log(Server running at http://127.0.0.1:1337/);% node example.jsServer running at http://127.0.0.1:1337/
  21. 21.  LinkedIn -> Mobile Yammer -> Cross Domain Github -> Download Yahoo! -> Mojito & Cocktails Voxer -> Realtime Voice VMWare …
  22. 22.  Taobao -> myfox Aliyun Sina -> SAE Sohu 雪球财经 …
  23. 23. Next? 北京香港 上海 广州 杭州
  24. 24. 12月25日 13:30(周日)上海浦东新区张江高科技园区碧波路690号3号楼免费报名:http://event.weibo.com/275553
  25. 25.  书法 http://sufa.cnodejs.net/
  26. 26.  在线协作绘画 http://paintchat.cnodejs.net/
  27. 27.  关键字日记 http://keydiary.cnodejs.net
  28. 28.  NodeBook http://nodebook.jit.im
  29. 29.  CNUG http://groups.google.com/group/cnodejs  952 posts  332 members CNodeJS http://cnodejs.org  131 posts
  30. 30.  API: http://cnodejs.org/cman/ InfoQ: 深入浅出Nodejs专栏  http://www.infoq.com/cn/articles/nodejs-in-front-end- engineer-view  http://www.infoq.com/cn/news/2011/11/tyq-nodejs- static-file-server
  31. 31.  The Node Beginner Book http://nodebeginner.org/index.html http://nodebeginner.org/index-zh-cn.html Up and Running with Node.js http://ofps.oreilly.com/titles/9781449398583/index.ht ml What’s Node http://radar.oreilly.com/2011/07/what-is-node.html http://ued.taobao.com/blog/2011/09/02/what-is-nod/
  32. 32. Q&A
  33. 33.  http://nodejs.org/ https://github.com/joyent/node http://cnodejs.net/ http://cnodejs.org http://npmjs.org

×