11

Click here to load reader

Node.js

Embed Size (px)

DESCRIPTION

node.js

Citation preview

Page 1: Node.js

Node.js Easy, Scaleable and Fast

Page 2: Node.js

The new cool kid in town

Java, Php, Rails and now Node.js

Page 3: Node.js

So, Why Node?

Page 4: Node.js

Cause Its fast

Page 5: Node.js

Fast mean

Event-Driven Non-Blocking I/O

Lightweight Efficient

Page 6: Node.js

Cause Its cool

Page 7: Node.js

Cool mean

Everyone to use it so its super easy to find people who will want to join you

Page 8: Node.js

Scalable

Node.js is the perfect solution for perfect for data-intensive real-time applications that run across distributed devices.

Page 9: Node.js

an example (CallBack)

result = query( "select smurfs from some_mushroom" ); // twiddle fingers

go_do_something_with_result( result );

query( statement: "select smurfs from some_mushroom", callback: go_do_something_with_result() );

Page 10: Node.js

an example (Events)

var events = require('events'); var eventEmitter = new events.EventEmitter();

var ringBell = function ringBell()

{ console.log('ring ring ring');

} eventEmitter.on('doorOpen', ringBell);

eventEmitter.emit('doorOpen');

Page 11: Node.js

an example (Events)

why we want to use event 1. dry 2. organize 3. callback 4. readable