NODE.JS BASIC
大綱、基礎介紹
Caesar Chi
http://about.me/clonn
Saturday, April 19, 14
Caesar Chi
clonncd
Saturday, April 19, 14
BASIC
•Java
•JavaScript
•Node.js
Saturday, April 19, 14
•Java
•JavaScript
•Node.js
Saturday, April 19, 14
BASIC
•Node.js
Saturday, April 19, 14
•Node.js
Saturday, April 19, 14
事前技能表
Saturday, April 19, 14
Command line
Saturday, April 19, 14
GIT(Github)
Saturday, April 19, 14
JavaScript
Saturday, April 19, 14
Server
Saturday, April 19, 14
注意事項
Saturday, April 19, 14
No Alert
Saturday, April 19, 14
No Alert
Saturday, April 19, 14
Crash only
Saturday, April 19, 14
SO...
Saturday, April 19, 14
JavaScript
Saturday, April 19, 14
JavaScript
Saturday, April 19, 14
好處?
Saturday, April 19, 14
JavaScript
Saturday, April 19, 14
JavaScript
Saturday, April 19, 14
JavaScript
Saturday, April 19, 14
1
Saturday, April 19, 14
Saturday, April 19, 14
FEATURE
Saturday, April 19, 14
NON-BLOCKING
非阻塞模式Saturday, April 19, 14
HIGH CONCURRENCY
高連線數量
http://www.flickr.com/photos/goldentime/4089413847/sizes/z/in/photostream/
Saturday, April 19, 14
EVENT-DRIVEN
事件驅動模型Saturday, April 19, 14
非阻塞?事件驅動?
Saturday, April 19, 14
以 當主角說明
Saturday, April 19, 14
舊有作法
Saturday, April 19, 14
Saturday, April 19, 14
舊有作法
Saturday, April 19, 14
舊有作法
Saturday, April 19, 14
舊有作法
Saturday, April 19, 14
非阻塞作法
Saturday, April 19, 14
Saturday, April 19, 14
var monther = require('monther');
monther.on(' ', function ( ) {
return ;
});
Saturday, April 19, 14
var monther = require('monther');
monther.on(' ', function ( ) {
return ;
});
Saturday, April 19, 14
var monther = require('monther');
monther.on(' ', function ( ) {
return ;
});
Saturday, April 19, 14
var monther = require('monther');
monther.on('cofee', function (data) {
return data;
});
monther.on('egg', function (egg) ...
MODULE
Saturday, April 19, 14
Saturday, April 19, 14
<script src=‘xxx’>
<script src=‘jquery.js’></script>
Saturday, April 19, 14
REQUIRE
=
LOAD MODULE
Saturday, April 19, 14
Saturday, April 19, 14
var xxxx=require(‘xxx’);
var http = require(‘http’);
var http = require(‘http.js’);
Saturday, April 19, 14
var xxxx=require(‘xxx’);
var http = require(‘http’);
var http = require(‘http.js’);
Saturday, April 19, 14
var xxxx=require(‘xxx’);
var http = require(‘http’);
var http = require(‘http.js’);
Saturday, April 19, 14
var xxxx=require(‘xxx’);
var http = require(‘http’);
var http = require(‘http.js’);
Saturday, April 19, 14
var http = require(‘http’);
var fs = require(‘fs’);
var path = require(‘./yoo’);
Saturday, April 19, 14
new.js
var a = 123;
old.js
var a = 456;
Saturday, April 19, 14
new.js
var a = 123;
old.js
var a = 456;
Saturday, April 19, 14
PRINT(A)?
Saturday, April 19, 14
Saturday, April 19, 14
module.js
module.exports = {};
Saturday, April 19, 14
COMMONJS
http://www.commonjs.org/
Saturday, April 19, 14
http://www.commonjs.org/
Saturday, April 19, 14
MODULE 管理
Saturday, April 19, 14
Saturday, April 19, 14
MODULE 管理
•Global module,
•例如, process
•internal module,
•例如, http, fs, path, child_process...
•external module,
Saturday,...
•Global module,
•例如, process
•internal module,
•例如, http, fs, path, child_process...
•external module,
Saturday, April 19,...
Saturday, April 19, 14
NPM
• npm install module_name
• npm install -g module_name
• npm update [module_name]
• npm list
• npm ...
Saturday, April...
• npm install module_name
• npm install -g module_name
• npm update [module_name]
• npm list
• npm ...
Saturday, April 19,...
NPM
•外部模組, 存於...
•node_modules/.....
Saturday, April 19, 14
•外部模組, 存於...
•node_modules/.....
Saturday, April 19, 14
NPM
•dependency manage
•package.json
Saturday, April 19, 14
•dependency manage
•package.json
Saturday, April 19, 14
NPM
•dependency manage
•package.json
Saturday, April 19, 14
•dependency manage
•package.json
Saturday, April 19, 14
as a web developers,
knowing some web structure is good for you
Saturday, April 19, 14
Saturday, April 19, 14
Saturday, April 19, 14
Saturday, April 19, 14
Saturday, April 19, 14
Saturday, April 19, 14
Upcoming SlideShare
Loading in...5
×

Node basic training

1,257

Published on

2 Comments
4 Likes
Statistics
Notes
No Downloads
Views
Total Views
1,257
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
20
Comments
2
Likes
4
Embeds 0
No embeds

No notes for slide

Node basic training

  1. 1. NODE.JS BASIC 大綱、基礎介紹 Caesar Chi http://about.me/clonn Saturday, April 19, 14
  2. 2. Caesar Chi clonncd Saturday, April 19, 14
  3. 3. BASIC •Java •JavaScript •Node.js Saturday, April 19, 14
  4. 4. •Java •JavaScript •Node.js Saturday, April 19, 14
  5. 5. BASIC •Node.js Saturday, April 19, 14
  6. 6. •Node.js Saturday, April 19, 14
  7. 7. 事前技能表 Saturday, April 19, 14
  8. 8. Command line Saturday, April 19, 14
  9. 9. GIT(Github) Saturday, April 19, 14
  10. 10. JavaScript Saturday, April 19, 14
  11. 11. Server Saturday, April 19, 14
  12. 12. 注意事項 Saturday, April 19, 14
  13. 13. No Alert Saturday, April 19, 14
  14. 14. No Alert Saturday, April 19, 14
  15. 15. Crash only Saturday, April 19, 14
  16. 16. SO... Saturday, April 19, 14
  17. 17. JavaScript Saturday, April 19, 14
  18. 18. JavaScript Saturday, April 19, 14
  19. 19. 好處? Saturday, April 19, 14
  20. 20. JavaScript Saturday, April 19, 14
  21. 21. JavaScript Saturday, April 19, 14
  22. 22. JavaScript Saturday, April 19, 14
  23. 23. 1 Saturday, April 19, 14
  24. 24. Saturday, April 19, 14
  25. 25. FEATURE Saturday, April 19, 14
  26. 26. NON-BLOCKING 非阻塞模式Saturday, April 19, 14
  27. 27. HIGH CONCURRENCY 高連線數量 http://www.flickr.com/photos/goldentime/4089413847/sizes/z/in/photostream/ Saturday, April 19, 14
  28. 28. EVENT-DRIVEN 事件驅動模型Saturday, April 19, 14
  29. 29. 非阻塞?事件驅動? Saturday, April 19, 14
  30. 30. 以 當主角說明 Saturday, April 19, 14
  31. 31. 舊有作法 Saturday, April 19, 14
  32. 32. Saturday, April 19, 14
  33. 33. 舊有作法 Saturday, April 19, 14
  34. 34. 舊有作法 Saturday, April 19, 14
  35. 35. 舊有作法 Saturday, April 19, 14
  36. 36. 非阻塞作法 Saturday, April 19, 14
  37. 37. Saturday, April 19, 14
  38. 38. var monther = require('monther'); monther.on(' ', function ( ) { return ; }); Saturday, April 19, 14
  39. 39. var monther = require('monther'); monther.on(' ', function ( ) { return ; }); Saturday, April 19, 14
  40. 40. var monther = require('monther'); monther.on(' ', function ( ) { return ; }); Saturday, April 19, 14
  41. 41. var monther = require('monther'); monther.on('cofee', function (data) { return data; }); monther.on('egg', function (egg) { return egg; }); monther.on('cake', function (cake) { return cake; }); Saturday, April 19, 14
  42. 42. MODULE Saturday, April 19, 14
  43. 43. Saturday, April 19, 14
  44. 44. <script src=‘xxx’> <script src=‘jquery.js’></script> Saturday, April 19, 14
  45. 45. REQUIRE = LOAD MODULE Saturday, April 19, 14
  46. 46. Saturday, April 19, 14
  47. 47. var xxxx=require(‘xxx’); var http = require(‘http’); var http = require(‘http.js’); Saturday, April 19, 14
  48. 48. var xxxx=require(‘xxx’); var http = require(‘http’); var http = require(‘http.js’); Saturday, April 19, 14
  49. 49. var xxxx=require(‘xxx’); var http = require(‘http’); var http = require(‘http.js’); Saturday, April 19, 14
  50. 50. var xxxx=require(‘xxx’); var http = require(‘http’); var http = require(‘http.js’); Saturday, April 19, 14
  51. 51. var http = require(‘http’); var fs = require(‘fs’); var path = require(‘./yoo’); Saturday, April 19, 14
  52. 52. new.js var a = 123; old.js var a = 456; Saturday, April 19, 14
  53. 53. new.js var a = 123; old.js var a = 456; Saturday, April 19, 14
  54. 54. PRINT(A)? Saturday, April 19, 14
  55. 55. Saturday, April 19, 14
  56. 56. module.js module.exports = {}; Saturday, April 19, 14
  57. 57. COMMONJS http://www.commonjs.org/ Saturday, April 19, 14
  58. 58. http://www.commonjs.org/ Saturday, April 19, 14
  59. 59. MODULE 管理 Saturday, April 19, 14
  60. 60. Saturday, April 19, 14
  61. 61. MODULE 管理 •Global module, •例如, process •internal module, •例如, http, fs, path, child_process... •external module, Saturday, April 19, 14
  62. 62. •Global module, •例如, process •internal module, •例如, http, fs, path, child_process... •external module, Saturday, April 19, 14
  63. 63. Saturday, April 19, 14
  64. 64. NPM • npm install module_name • npm install -g module_name • npm update [module_name] • npm list • npm ... Saturday, April 19, 14
  65. 65. • npm install module_name • npm install -g module_name • npm update [module_name] • npm list • npm ... Saturday, April 19, 14
  66. 66. NPM •外部模組, 存於... •node_modules/..... Saturday, April 19, 14
  67. 67. •外部模組, 存於... •node_modules/..... Saturday, April 19, 14
  68. 68. NPM •dependency manage •package.json Saturday, April 19, 14
  69. 69. •dependency manage •package.json Saturday, April 19, 14
  70. 70. NPM •dependency manage •package.json Saturday, April 19, 14
  71. 71. •dependency manage •package.json Saturday, April 19, 14
  72. 72. as a web developers, knowing some web structure is good for you Saturday, April 19, 14
  73. 73. Saturday, April 19, 14
  74. 74. Saturday, April 19, 14
  75. 75. Saturday, April 19, 14
  76. 76. Saturday, April 19, 14
  77. 77. Saturday, April 19, 14
  1. A particular slide catching your eye?

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

×