ECMAScript Harmony – Compile ES6 code to ES5 using Traceur/Babel

ECMAScript Edition 6 (ES6) comes with lot of features such as classes, generators, destructuring, modules and much more. Currently ES6 code is not yet implemented/supported in all browsers and JS engines, you might wanna look here. Using Firefox and chrome(latest) developer tools you can test features like arrow functions etc. for chrome you will also need to […]

Node.js Streams, Pipe and chaining

A stream is an abstract interface implemented by various objects in Node.js.  Due to asynchronous and event driven nature Node.js is very good at handling I/O bound tasks/streams, streams are actually unix pipes. For example a request to an HTTP server is a stream, as is stdout. request is a readable stream and response is a […]

Angular.js Promises – Deferred and Promise handling

A promise is an object that represents the return value or the thrown exception that the function may eventually provide. A promise can also be used as a proxy for a remote object to overcome latency. Promises are highly useful when you wish to synchronize multiple asynchronous functions and also want to avoid Javascript callback hell. […]

Introduction to WebSockets – Server, Client examples using Node.js

Initially the paradigm about web was Client/Server model, in which client’s job is to request data from a server, and a server’s job is to fulfill those requests. This paradigm fulfills the web requirement for number of years, but later on with Introduction of AJAX makes us enable to communicate with server asynchronously. Now using AJAX it was easy […]