node js 入門

Download Node js 入門

Post on 22-Apr-2015

5.657 views

Category:

Technology

0 download

Embed Size (px)

DESCRIPTION

勉強会で発表した資料。

TRANSCRIPT

  • 1. Satoshi Takami @tikemin 1
  • 2. Agenda Hello Node.js Node.jsWeb Node.jsMySQL Node.jsWeb Node.js 2
  • 3. Node.js Node.js Node.js 3
  • 4. Hello Node.js 4
  • 5. Node.js? C10K I/O Google V8 Server Side js 5
  • 6. Node.js 2009 Scalable Network/Easily Building Fast Concept Node s goal is to make non-blocking network programming accessible to users who are not well-versed in server development. (Ryan Dahl) 6
  • 7. Node.js Web2.0... C()10K(1) I/O ApacheHTTP( 32767) C10K 7
  • 8. Node.js ... () (DBetc.) 8
  • 9. Node.js (Ryan Dahl) Google V8 I/O 9
  • 10. 10
  • 11. Node.js C10K Google V8 I/O Server Side js(Java Script) 11
  • 12. Node.js http://www.iij.ad.jp/company/development/tech/activities/nodejs/ c-ares OS non-blocking I/O system call zlib libev Node Core Module V8 Node User Module libeio libuv openssl http-parser epoll kqueue event port IOCP Linux BSD Solaris(SmartOS) Windows 12
  • 13. 13
  • 14. Node.jsWeb 14
  • 15. WindowsNode.js http://ad-da.jp/download/nttdata/study/ nodejsstudy.zip 15
  • 16. Node.jsMySQL 16
  • 17. Node.js Web 17
  • 18. Node.js 18
  • 19. Node.jsFW Express(http://expressjs.com/) Sinatra WebFW Salis.js(http://sailsjs.org/) MVC FW http://nantokaworks.com/?p=1101 19
  • 20. Node.jsJava FW DAO DB Buisness Logic JSP Struts Struts + Spring Bean 20
  • 21. Express http://www.slideshare.net/dbloete/expressjs Connect Session Provider Session Cookie ErrorHandling Helper Connection Jade (Template Engine) + EJS View Controller/Model 21
  • 22. Express https://github.com/balderdashy/sails/blob/ master/README.md http://expressjs.com/ https://github.com/senchalabs/connect http://embeddedjs.com/ 22
  • 23. 23
  • 24. Node.js 24
  • 25. TypeScript MicorosoftNode.js js() IDE(VS) http://www.typescriptlang.org/ 25
  • 26. TypeScript Sample Hello, World!!Type Script!! 1 // 2 module TSSample{ 3 // 4 export class Sample{ 5 // 6 constructor(private text : string){ 7 } 8 // 9 display(_InAddText : string) : void{ 10 console.log(this.text + ' ' + _InAddText); 11 } 12 } 13 } 14 var sample : TSSample.Sample = new TSTest.Sample('Hello, World !!!'); 15 sample.display('TypeScript!'); 26
  • 27. References Node http://d.hatena.ne.jp/badatmath/20101020/1287587240 Web2.0 http://www.atmarkit.co.jp/news/analysis/200701/09/c10k.html npm proxyby makits http://p.tl/GQCK Node.js(Ryan Dahl) http://www.publickey1.jp/blog/11/nodejs_node.html http://www.publickey1.jp/blog/11/nodejsnodejs.html 27