Quick Intro to Node.js
What it is ?
- based on Javascript V8 runtime
- event driven
- non-blocking standard libraries
- Streams is supported in most APIs
- support for C/C++ extension
- package manager is included
Blocking code
Non-blocking code
ေမာင္လွ  တံျမက္စည္းလွည္း၊  ေရခ်ိဳး  ၿပီးရင္  ထမင္းစားထားေခ်။
ေမာင္ျမသည္  ေဆးေပါ့လိပ္ကုုိ  ပါးေစာင္တြင္ခဲကာ  ဖဲထုုိင္႐ုုိက္ေနသည္။  
Real World Example
var contents = fs.readFileSync('/etc/hosts');
console.log(contents);
console.log('Doing something else');
!
fs.readFile('/etc/hosts', function(err, contents) {
console.log(contents);
});
console.log('Doing something else’);
Differences !
- non-block code
- single thread yet multiple pipeline
- event driven
- realtime ready
Same
- npm ( gem,composer,pip )
- modular structure
- frameworks (express,sail,meteor,koa)
- Javascript everywhere
- can freely decide project structure
- same with front-end code
- reusable
- familiar to us
- can happily work with JSON style databases (MariaDB,MongoDB)
Why ??
(Hooray!, rise of Javascript)
Who use it ???
- LinkedIn,Yahoo! Microsoft Azure, Paypal
- Strong and active community (Google)
- Joyent start it, visionmedia contribute a
lot and strongloop
- approximately repo rate 4x increase in
this year
- There’s local node.js group (small but
yet promising)
How ??
What node isn’t
- Frameworks like Laravel, Django and Rails
- New Programming Language
- Silver Bullet
- Multi-threaded
- For Beginners
What node is
- Web Socket Server
- Fast File upload Client
- Ad Server
- Any Realtime data app
Pitfall
- Memory Management
- hard to catch on
- no significant difference or even slower in normal traffic
- difficult to debug
- strongly relies on benchmarking
- not suit with normal crud applications
- need to embrace whole new paradigm
The next Web
Imagine
Furthermore
Learning sites (Codeschool,tutplus, and many so on)
Node.js offical website
Google Node.js videos on youtube
!
!
Contact
twitter : @kelvinm0rRis
github : /nainglinaung
linkedin : /in/nainglinaung

Quick Introduction to Node.js

  • 1.
  • 2.
    What it is? - based on Javascript V8 runtime - event driven - non-blocking standard libraries - Streams is supported in most APIs - support for C/C++ extension - package manager is included
  • 3.
    Blocking code Non-blocking code ေမာင္လွ တံျမက္စည္းလွည္း၊  ေရခ်ိဳး  ၿပီးရင္  ထမင္းစားထားေခ်။ ေမာင္ျမသည္  ေဆးေပါ့လိပ္ကုုိ  ပါးေစာင္တြင္ခဲကာ  ဖဲထုုိင္႐ုုိက္ေနသည္။  
  • 4.
    Real World Example varcontents = fs.readFileSync('/etc/hosts'); console.log(contents); console.log('Doing something else'); ! fs.readFile('/etc/hosts', function(err, contents) { console.log(contents); }); console.log('Doing something else’);
  • 5.
    Differences ! - non-blockcode - single thread yet multiple pipeline - event driven - realtime ready Same - npm ( gem,composer,pip ) - modular structure - frameworks (express,sail,meteor,koa)
  • 6.
    - Javascript everywhere -can freely decide project structure - same with front-end code - reusable - familiar to us - can happily work with JSON style databases (MariaDB,MongoDB) Why ?? (Hooray!, rise of Javascript)
  • 7.
    Who use it??? - LinkedIn,Yahoo! Microsoft Azure, Paypal - Strong and active community (Google) - Joyent start it, visionmedia contribute a lot and strongloop - approximately repo rate 4x increase in this year - There’s local node.js group (small but yet promising)
  • 8.
  • 9.
    What node isn’t -Frameworks like Laravel, Django and Rails - New Programming Language - Silver Bullet - Multi-threaded - For Beginners What node is - Web Socket Server - Fast File upload Client - Ad Server - Any Realtime data app
  • 10.
    Pitfall - Memory Management -hard to catch on - no significant difference or even slower in normal traffic - difficult to debug - strongly relies on benchmarking - not suit with normal crud applications - need to embrace whole new paradigm
  • 11.
  • 12.
    Furthermore Learning sites (Codeschool,tutplus,and many so on) Node.js offical website Google Node.js videos on youtube ! !
  • 13.
    Contact twitter : @kelvinm0rRis github: /nainglinaung linkedin : /in/nainglinaung