JavaScript is a light weight ,interpreted programming language. It is the most popular scripting language which is used by many popular browsers like Mozilla, Safari,Opera,Chrome etc.
JavaScript is embedded directly into Html Pages.
Features...
Saturday, 19 January 2013
Thursday, 17 January 2013
what is node
!--
google_ad_client = "ca-pub-4378340310740210";
/* rectangle-nodemongo */
google_ad_slot = "1751391070";
google_ad_width = 336;
google_ad_height = 280;
//
-->
...
Thursday, 10 January 2013
Non Blocking I/O in Node.js
!--
google_ad_client = "ca-pub-4378340310740210";
/* rectangle-nodemongo */
google_ad_slot = "1751391070";
google_ad_width = 336;
google_ad_height = 280;
//
-->
Difference between Blocking...
Call Back in node.js
!--
google_ad_client = "ca-pub-4378340310740210";
/* rectangle-nodemongo */
google_ad_slot = "1751391070";
google_ad_width = 336;
google_ad_height = 280;
//
-->
We can add call back in node.js in two ways
1.Write a call back inside a method
Ex:
fs.readFile('/abc/def',function(err,data) {
console.log(data);
});
2....
Tuesday, 8 January 2013
Filesystem module (fs) in node.js
File system module is to access files on the disk.
To use the module, use "require(fs) " and all the methods have synchronous and asynchronous forms.
Asyn form always takes completion call back as a last argument and 1st argument for exception. If the operation completed...
Event mechanism in node.js
Node.js is an Event driven like Dom. When user interacts with particular interface, then there is an event.
Node.js created EventEmitter class to provide basic event functionality.
require('events').EventEmitter to access EventEmitter.
This class contains different events
1.emitter.addListener(event,listener) ...