The Node.js philosophy

suggest change

Small Core, Small Module :-

Build small, single-purpose modules. That means a small scope, not only a small file.

a - "Small is beautiful"
b - "Make each program do one thing well."

The Reactor Pattern

The reactor pattern is the heart of Node's asynchronous design. One thread runs an event loop, which dispatches events to handlers.

libuv is the library that implements that loop and the thread pool for the I/O that cannot be done on the loop itself.

The Observer Pattern(EventEmitter) maintains a list of dependents/observers and notifies them

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

var ringBell = function ringBell()
{
  console.log('tring tring tring');
}
eventEmitter.on('doorOpen', ringBell);

eventEmitter.emit('doorOpen');

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents