Skip to main content

Node.js and client app are the future of webdeving?

Recently we had to try a new technology. As expected, we did hit edge case quickly. After analyzing thoroughly, we had to ditch part of the stack.

But, I had developed much interest over Node.js, Redis, WebSocket and client app technologies lately and I hope that they'll take the lead.

Some frequently asked questions about these technologies:

What is Node.js?
It is set of JavaScript libraries around Google’s V8 JavaScript engine, written by Ryan Dahl in 2009.

Why Node.js is picking up?
With Node.js, it’s easy to write web server in pure JavaScript. We can totally eliminate another language interpreter layer by programming the web server to handle the request directly (For example, in LAMP, PHP is required to handle the requests. But, in Node.js based server, no such layer is required).

Is Node.js a right choice?
It depends. Though few developers may find it easy to adopt, others may find it difficult to write quality code in event-driven asynchronous style. When there are lots of modules in a project, it is better to stay with Rails-like framework.

What is Redis?
Redis is key-value (think about array('key'=> 'value')) based in-memory database.

Why Redis is picking up?
With Redis, the data access time will be greatly improved.

Is Redis a right choice?
For me, Redis is an ideal choice for medium-to-high data store and where complex reports are not required; in those cases, it’s better to use it around any RDBMS like MySQL.

What is client app technology?
The "views/templates" are available in client-side (obviously transferred from server once) and the data are transferred in JSON format from server. With this, it may be enough to setup REST service in server-end; but the client-side code may get trickier. This approach is already used in Gmail and Twitter. With Backbone.js, Knockout.js and similar frameworks, it's somewhat easy to write client apps.

Why client app technology is picking up?
Few modules--like digg, delicious, etc are the latest trend in web. So, it would be right choice for fast responsive web pages.

Is client app a right technology?
If there are too many modules and SEO is of big concern, it’s better to stay with Rails-like framework. But, note that LinkedIn has mentioned that SEO is possible with dust.js, the library that they have chosen for their client app technology migration. Some developers may find it difficult and would end up writing sloppy codes. When more browsers compatibilities are required, it may not be the right fit.

What is WebSocket?
It is the push technology through we can instantly push changed data to client.

Is WebSocket a right choice?
It depends. When the data changes are to be propagated to all clients, it will be ideal choice. We may use Socket.Io library for the browser compatibility. It is also a good fit with Node.js

Comments

Popular posts from this blog

Problems with CakePHP - follow-up

Some people have responded including the Datepicker fame Marc Grabanski . So, this follow-up... First of all, I was not ranting nor complaining; I've just blogged/documented my experience. The common problem most of the people pointed out are that it scales for addons.mozilla.com. Those who have accessed their source code can understand that they've done lot of things and also the site is not database-intensive. You should really create a real database-intensive website to understand what I mean. The other point that been pointed out is about open source and community. Lot of people may not be knowing that it's 2 people pushing it and don't want others to be credited . The generic model or dynamic model idea was originally been from grigri and Marcel . It's hard to be called as open source as only few and sycophants are driving it's direction (I'm not talking about svn access) So, here are my humble checklist before you start shouting at me Did you read a

Humble Award - Dr. A.N. Sreevatsan

Dr. A.N. Sreevatsan , ENT specialist located in Adyar, Chennai is one of the gems available in medicines. No assistants in his consulting room and he'd take at least 15mins for every patients. So far I have referred many and all are happy with his approach. Every wannabe doctor should visit him personally to understand his approach. I wish him to be more famous than now. Update (2010-11-21) : Added link to Google Map Keywords : Sreevatsan, Srivatsan, ENT, Adyar, Chennai, Hospital, Doctor

Vodafone India privacy problem: exposes phone numbers

Vodafone India is exposing website surfer/user's phone number to the partner website when using mobile data plan. It might be offering hidden API to those partner websites to uniquely identify users. I have noticed it around 1-year before, thought about blogging, but forgot it at that time. Now, I have got some time and so thought of explaining the issue. How I noticed the issue? Sometime ago, I've bought SanDisk microSD card. In the wrapper, they've mentioned about some offer about hungama (Still available in SanDisk website at www.sandisk.in/campaign/landing/hungama/offer_three). The URL mentioned was offers.hungama.com/sandisk3/ and when I opened that in my mobile browser, it was prompting with Welcome, 91-98XXXXXXXX . Phone number leaked by Vodafone India I was shocked as I never seen anything like that before. So, I immediately opened the same URL in my desktop browser and got completely different page: Desktop version of the same page And, aga