09. January 2016

Cordova today

During these years Cordova and the mobile phones have come a long way. Today it seems the mobiles are more powerful and can handle a web application quite nicely. On the other hand Cordova tool chain also has matured. Comparing to older versions of the tool chain, currently its purely NPM based, as long as we talk about cross platform development. So anything one needs is just a npm install away.

more

08. December 2015

What is Socket.IO ?

Once one starts working on NodeJS, very soon will come across a term called Socket.IO. It may feel as if just another NodeJS module available through NPM. Then it may feel like just another way to write a Javascript application for the browser. Then it may seem something else.

So lets know what is it?

  • Its two things, a server framework and client framework.
  • Its a NodeJS module ( install it from a NPM )
  • Its a client library ( .js file )

Now, lets understand a little more in detail.

Socket.IO is built to take advantage of WebSockets for a two way communication between server and client.

Server Framework

When you work on NodeJS to implement a socket server, Socket.IO makes your life easier by providing a NodeJS module. That means, without Socket.IO server module also, you can write a socket server with only NodeJS. That also means, you have to write and test your own socket server using NodeJS. This is possible with NodeJS provided built in modules but only take time and effort. In that sense we can say Socket.IO is a server framework for NodeJS to write socket servers.

Client Framework

Now to write a client (basically a web application) we can incorporate WebSockets API. Well, its possible in the same manner that we can write a Socket server by our own using NodeJS as explained above. But then Socket.IO provides us a ‘.js’ file with exposed APIs to use, which is cross-platform. That means Socket.IO gives a frontend framework too, to write our frontend Javascript applications.

Happy Noding.