Your SlideShare is downloading. ×
0
NODE.JS BASIC    大綱、基礎介紹         Caesar Chi         http://about.me/clonn
BASIC•Java•JavaScript•Node.js
•Java•JavaScript•Node.js
課程•Node.js•Node.js   MySQL•RealTime Application•NoSQL
•Node.js•Node.js   MySQL•RealTime Application•NoSQL
事前技能表
Command line
GIT(Github)
JavaScript
Server
注意事項
No Alert
No Alert
Crash only
講   麼多
JavaScript
JavaScript
好處?
JavaScript
JavaScript
JavaScript
JavaScript
JavaScript
JavaScript
NON-BLOCKING  非阻塞模式
EVENT-DRIVEN事件驅動模型
http://www.flickr.com/photos/goldentime/4089413847/sizes/z/in/photostream/ HIGH CONCURRENCY     高連線數量
非阻塞?事件驅動?
用具體一點的說法
以媽媽當主角說明
舊有作法
舊有作法
舊有作法
舊有作法
非阻塞作法
ZZZZZZZ
JS STYLE
var monther = require(monther);
var monther = require(monther);monther.on(       , function (    ){  return   ;});
var monther = require(monther);monther.on(       , function (    ){  return   ;});
var monther = require(monther);monther.on(       , function (    ){  return   ;});
var monther = require(monther);monther.on(cofee, function (data) {  return data;});monther.on(egg, function (egg) {  retur...
REQUIRE???
REQUIRE    =LOAD MODULE
<script src=‘xxx’>
<script src=‘xxx’><script src=‘jquery.js’></script>
var xxxx=require(‘xxx’);
var xxxx=require(‘xxx’);
var xxxx=require(‘xxx’);         var http = require(‘http’);
var xxxx=require(‘xxx’);         var http = require(‘http’);
var xxxx=require(‘xxx’);        var http = require(‘http.js’);        var http = require(‘http’);
var xxxx=require(‘xxx’);        var http = require(‘http.js’);        var http = require(‘http’);
var xxxx=require(‘xxx’);        var http = require(‘http.js’);        var http = require(‘http’);
var xxxx=require(‘xxx’);        var http = require(‘http.js’);        var http = require(‘http’);
new.js         old.jsvar a = 123;   var a = 456;
new.js         old.jsvar a = 123;   var a = 456;
PRINT(A)?
module.jsmodule.exports = {};
MODULE
var http = require(‘http’);var fs = require(‘fs’);var path = require(‘./yoo’);.
COMMONJS http://www.commonjs.org/
http://www.commonjs.org/
MODULE 管理
MODULE 管理• Global   module,   • 例如, process• internal   module,   • 例如, http, fs, path, child_process...• external   module,
• Global   module,   • 例如, process• internal   module,   • 例如, http, fs, path, child_process...• external   module,
NPM• npm   install module_name• npm   install -g module_name• npm   update [module_name]• npm   list• npm   ...
• npm   install module_name• npm   install -g module_name• npm   update [module_name]• npm   list• npm   ...
NPM•外部模組,        存於... •node_modules/.....
•外部模組,        存於... •node_modules/.....
NPM•dependency   manage •package.json
•dependency   manage •package.json
NPM•dependency   manage •package.json
•dependency   manage •package.json
NODE 到底是什麼?
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Node workShop Basic
Upcoming SlideShare
Loading in...5
×

Node workShop Basic

1,059

Published on

介紹 Node.js & JavaScript 開發基本觀念,以及 Node.js API 基本介紹

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

No Downloads
Views
Total Views
1,059
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
36
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide
  • \n
  • &amp;#x57FA;&amp;#x790E;&amp;#x524D;&amp;#x9762;&amp;#xFF0C;&amp;#x5148;&amp;#x63D0;&amp;#x5230; Java, JavaScript, Node.js &amp;#x4E4B;&amp;#x9593;&amp;#x7684;&amp;#x95DC;&amp;#x4FC2;&amp;#xFF0C;&amp;#x6BD4;&amp;#x8F03;&amp;#x4E09;&amp;#x8005;&amp;#x95DC;&amp;#x4FC2;\n
  • &amp;#x57FA;&amp;#x790E;&amp;#x524D;&amp;#x9762;&amp;#xFF0C;&amp;#x5148;&amp;#x63D0;&amp;#x5230; Java, JavaScript, Node.js &amp;#x4E4B;&amp;#x9593;&amp;#x7684;&amp;#x95DC;&amp;#x4FC2;&amp;#xFF0C;&amp;#x6BD4;&amp;#x8F03;&amp;#x4E09;&amp;#x8005;&amp;#x95DC;&amp;#x4FC2;\n
  • \n
  • \n
  • \n
  • Node.js always code in JavaScript\n
  • Node.js always code in JavaScript\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • &amp;#x9084;&amp;#x662F;&amp;#x8981;&amp;#x6301;&amp;#x7E8C;&amp;#x5BEB; JavaScript\n
  • &amp;#x9084;&amp;#x662F;&amp;#x8981;&amp;#x6301;&amp;#x7E8C;&amp;#x5BEB; JavaScript\n
  • \n
  • broswser\n
  • server js\n\n
  • &amp;#x524D;&amp;#x5F8C;&amp;#x7AEF;&amp;#x90FD;&amp;#x4E00;&amp;#x8D77;&amp;#x5BEB; JavaScript\n
  • &amp;#x5F8C;&amp;#x7AEF;&amp;#x7A31;&amp;#x70BA; Node, &amp;#x524D;&amp;#x7AEF;&amp;#x7A31;&amp;#x70BA; JavaScript&amp;#xFF0C;&amp;#x9664;&amp;#x4E86;&amp;#x8A9E;&amp;#x8A00;&amp;#x4E0A;&amp;#x7684;&amp;#x512A;&amp;#x52E2;&amp;#x4E4B;&amp;#x5916;&amp;#xFF1F;\n
  • &amp;#x5F8C;&amp;#x7AEF;&amp;#x7A31;&amp;#x70BA; Node, &amp;#x524D;&amp;#x7AEF;&amp;#x7A31;&amp;#x70BA; JavaScript&amp;#xFF0C;&amp;#x9664;&amp;#x4E86;&amp;#x8A9E;&amp;#x8A00;&amp;#x4E0A;&amp;#x7684;&amp;#x512A;&amp;#x52E2;&amp;#x4E4B;&amp;#x5916;&amp;#xFF1F;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x6A21;&amp;#x5F0F;&amp;#xFF0C;&amp;#x8B1B;&amp;#x89E3;&amp;#x4E00;&amp;#x4E0B;&amp;#x963B;&amp;#x585E;&amp;#x6A21;&amp;#x5F0F;&amp;#x662F;&amp;#x600E;&amp;#x9EBC;&amp;#x9032;&amp;#x884C;&amp;#xFF0C;&amp;#x4F7F;&amp;#x7528; request &amp;#x65B9;&amp;#x5F0F;\n\n
  • &amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF0C;&amp;#x7576;&amp;#x8A3B;&amp;#x518A;&amp;#x4E8B;&amp;#x4EF6;&amp;#x6642;&amp;#xFF0C;&amp;#x53EA;&amp;#x6709;&amp;#x88AB;&amp;#x89F8;&amp;#x767C;&amp;#x7684;&amp;#x6642;&amp;#x5019;&amp;#x624D;&amp;#x6703;&amp;#x5F15;&amp;#x767C;&amp;#xFF0C;&amp;#x4E26;&amp;#x4E0D;&amp;#x662F;&amp;#x8A3B;&amp;#x518A;&amp;#x7684;&amp;#x6642;&amp;#x5019;&amp;#x5C31;&amp;#x57F7;&amp;#x884C;&amp;#x3002;\n\n
  • &amp;#x56E0;&amp;#x6B64;&amp;#x4EE5;&amp;#x4E0A;&amp;#x5169;&amp;#x7A2E;&amp;#x7279;&amp;#x6027;&amp;#x5EFA;&amp;#x7ACB;&amp;#xFF0C;&amp;#x5C31;&amp;#x53EF;&amp;#x4EE5;&amp;#x64C1;&amp;#x6709;&amp;#x9AD8;&amp;#x9023;&amp;#x7DDA;&amp;#x6578;&amp;#x91CF;\n\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x6574;&amp;#x9AD4;&amp;#x4F86;&amp;#x8AAA; js code &amp;#x6703;&amp;#x5448;&amp;#x73FE;&amp;#x70BA;&amp;#x4EC0;&amp;#x9EBC;&amp;#x6A23;&amp;#x7684;&amp;#x65B9;&amp;#x5F0F;&amp;#xFF1F;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x6574;&amp;#x9AD4;&amp;#x4F86;&amp;#x8AAA; js code &amp;#x6703;&amp;#x5448;&amp;#x73FE;&amp;#x70BA;&amp;#x4EC0;&amp;#x9EBC;&amp;#x6A23;&amp;#x7684;&amp;#x65B9;&amp;#x5F0F;&amp;#xFF1F;\n
  • &amp;#x6574;&amp;#x9AD4;&amp;#x4F86;&amp;#x8AAA; js code &amp;#x6703;&amp;#x5448;&amp;#x73FE;&amp;#x70BA;&amp;#x4EC0;&amp;#x9EBC;&amp;#x6A23;&amp;#x7684;&amp;#x65B9;&amp;#x5F0F;&amp;#xFF1F;\n
  • &amp;#x524D;&amp;#x7AEF;&amp;#x4F7F;&amp;#x7528;&amp;#x7684;&amp;#x65B9;&amp;#x5F0F;&amp;#x4F7F;&amp;#x7528; script, src, &amp;#x8209;&amp;#x4F8B; jquery.js\n
  • &amp;#x5F8C;&amp;#x7AEF;&amp;#x7A31;&amp;#x70BA; Node, &amp;#x524D;&amp;#x7AEF;&amp;#x7A31;&amp;#x70BA; JavaScript&amp;#xFF0C;&amp;#x9664;&amp;#x4E86;&amp;#x8A9E;&amp;#x8A00;&amp;#x4E0A;&amp;#x7684;&amp;#x512A;&amp;#x52E2;&amp;#x4E4B;&amp;#x5916;&amp;#xFF1F;\n
  • &amp;#x5F8C;&amp;#x7AEF;&amp;#x7A31;&amp;#x70BA; Node, &amp;#x524D;&amp;#x7AEF;&amp;#x7A31;&amp;#x70BA; JavaScript&amp;#xFF0C;&amp;#x9664;&amp;#x4E86;&amp;#x8A9E;&amp;#x8A00;&amp;#x4E0A;&amp;#x7684;&amp;#x512A;&amp;#x52E2;&amp;#x4E4B;&amp;#x5916;&amp;#xFF1F;\n
  • http.js\n
  • module &amp;#x5F15;&amp;#x5165;&amp;#x65B9;&amp;#x6CD5;, .js &amp;#x53EF;&amp;#x52A0;&amp;#x5165;&amp;#xFF0C;&amp;#x53EF;&amp;#x4E0D;&amp;#x52A0;&amp;#x5165;\n
  • module &amp;#x5F15;&amp;#x5165;&amp;#x65B9;&amp;#x6CD5;, .js &amp;#x53EF;&amp;#x52A0;&amp;#x5165;&amp;#xFF0C;&amp;#x53EF;&amp;#x4E0D;&amp;#x52A0;&amp;#x5165;\n
  • &amp;#x5982;&amp;#x679C;&amp;#x5169;&amp;#x500B;&amp;#x6A94;&amp;#x6848;&amp;#x4E92;&amp;#x76F8;&amp;#x8B8A;&amp;#x6578;&amp;#x662F;&amp;#x53D6;&amp;#x4E00;&amp;#x6A23;&amp;#x7684;&amp;#xFF0C;&amp;#x4EE5;&amp;#x524D;&amp;#x7AEF;&amp;#x4F86;&amp;#x8AAA;&amp;#xFF0C;\n
  • &amp;#x4E92;&amp;#x76F8;&amp;#x6253;&amp;#x67B6;\n
  • &amp;#x6574;&amp;#x9AD4;&amp;#x4F86;&amp;#x8AAA; js code &amp;#x6703;&amp;#x5448;&amp;#x73FE;&amp;#x70BA;&amp;#x4EC0;&amp;#x9EBC;&amp;#x6A23;&amp;#x7684;&amp;#x65B9;&amp;#x5F0F;&amp;#xFF1F;\n
  • &amp;#x6BCF;&amp;#x500B; file, &amp;#x90FD;&amp;#x662F;&amp;#x4E00;&amp;#x500B; module, &amp;#x4E92;&amp;#x76F8;&amp;#x5F15;&amp;#x7528;&amp;#xFF0C;&amp;#x537B;&amp;#x4E0D;&amp;#x6703;&amp;#x4E92;&amp;#x76F8;&amp;#x5E72;&amp;#x64FE;&amp;#xFF0C;&amp;#x6703;&amp;#x662F;&amp;#x7368;&amp;#x7ACB;&amp;#x904B;&amp;#x4F5C;&amp;#x7684;&amp;#x6A21;&amp;#x7D44;&amp;#xFF0C;&amp;#x81F3;&amp;#x65BC;&amp;#x9019;&amp;#x4E9B;&amp;#x904B;&amp;#x4F5C;&amp;#x7684;&amp;#x898F;&amp;#x7BC4;&amp;#x90FD;&amp;#x7A31;&amp;#x70BA;\n
  • &amp;#x6574;&amp;#x9AD4;&amp;#x4F86;&amp;#x8AAA; js code &amp;#x6703;&amp;#x5448;&amp;#x73FE;&amp;#x70BA;&amp;#x4EC0;&amp;#x9EBC;&amp;#x6A23;&amp;#x7684;&amp;#x65B9;&amp;#x5F0F;&amp;#xFF1F;\n
  • &amp;#x9019;&amp;#x4E9B;&amp;#x90FD;&amp;#x662F;&amp;#x6A21;&amp;#x7D44;&amp;#xFF0C;&amp;#x6BCF;&amp;#x500B;&amp;#x90FD;&amp;#x662F;&amp;#x6A21;&amp;#x7D44;\n
  • &amp;#x9019;&amp;#x4E9B;&amp;#x6771;&amp;#x897F;&amp;#x90FD;&amp;#x662F;&amp;#x5C6C;&amp;#x65BC; commonjs &amp;#x898F;&amp;#x7BC4;&amp;#x90E8;&amp;#x5206;&amp;#xFF0C;common &amp;#x4E26;&amp;#x4E0D;&amp;#x662F;&amp;#x4E00;&amp;#x5957;&amp;#x65B0;&amp;#x7684; library &amp;#xFF0C;&amp;#x800C;&amp;#x662F;&amp;#x898F;&amp;#x7BC4;, &amp;#x7528;&amp;#x4F86;&amp;#x898F;&amp;#x7BC4; js &amp;#x5728;&amp;#x524D;&amp;#x7AEF;&amp;#x4EE5;&amp;#x5916;&amp;#x61C9;&amp;#x7528;&amp;#x7684;&amp;#x65B9;&amp;#x5F0F;\n
  • &amp;#x90A3;&amp;#x65E2;&amp;#x7136;&amp;#x6709;&amp;#x9019;&amp;#x9EBC;&amp;#x591A;&amp;#x6A21;&amp;#x7D44;&amp;#xFF0C;&amp;#x8981;&amp;#x600E;&amp;#x9EBC;&amp;#x7BA1;&amp;#x7406;&amp;#xFF1F;\n
  • &amp;#x6709;&amp;#x5206;&amp;#x6210;&amp;#x5168;&amp;#x5C40;&amp;#x53EF;&amp;#x4F7F;&amp;#x7528;&amp;#xFF0C;&amp;#x4E0D;&amp;#x7528;&amp;#x8F09;&amp;#x5165;&amp;#x3001;&amp;#x5167;&amp;#x90E8;&amp;#x4F7F;&amp;#x7528;&amp;#xFF0C;&amp;#x4F46;&amp;#x662F;&amp;#x9700;&amp;#x8981;&amp;#x505A; require, &amp;#x5916;&amp;#x90E8;&amp;#x4F7F;&amp;#x7528;&amp;#xFF0C;&amp;#x9700;&amp;#x8981;&amp;#x5F15;&amp;#x5165;&amp;#x5916;&amp;#x90E8;&amp;#x6A94;&amp;#x6848;&amp;#xFF0C;&amp;#x6A21;&amp;#x7D44;\n
  • npm, node package management.\n
  • npm, node package management.\n
  • node_module &amp;#x7684;&amp;#x5132;&amp;#x5B58;&amp;#x4F4D;&amp;#x7F6E;\n
  • package.json &amp;#x7684;&amp;#x4F7F;&amp;#x7528;&amp;#x6027;\n
  • package.json &amp;#x7684;&amp;#x4F7F;&amp;#x7528;&amp;#x6027;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • &amp;#x975E;&amp;#x963B;&amp;#x585E;&amp;#x3001;&amp;#x4E8B;&amp;#x4EF6;&amp;#x9A45;&amp;#x52D5;&amp;#xFF1F;&amp;#x8DDF;&amp;#x5927;&amp;#x5BB6;&amp;#x8AAA;&amp;#x660E;&amp;#x4E00;&amp;#x6B21;\n
  • Transcript of "Node workShop Basic"

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

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

    ×