If  I don’t restart writing JavaScript I will soon be a dinosaur – the green one with moss all over.

Who would have thought?  certainly not me.  Java Script was exciting when it came around first.  Data validations did not require a server round trip  anymore.  It was annoying the IE refused to provide JavaScript support.  We all fiddled around with two sets of routines – one in JavaScript and another in VBScript to play nice with browsers.  Let us call it Days of Validation.

Soon enough days of DHTML came by and it spiced things up big time.  Suddenly we could do a bit of ‘eval’ on a plain string and make it come alive as code.  <DIV>s and <SPAN>s became cornerstones of dynamic UI. CSS played second fiddle but the marriage seems to have been made in heaven.  Those were the days!  The O’Reilly book was the bible.

My next serious stint with JavaScript had to wait for a long time.   The days of AJAX. This time it came around through a project for Teach For America.  By this time JavaScript had full-fledged libraries.  Nice! I for the first time heard of Prototype.js, YahooUI  and Dojo.  JSON was the new dancing dude – my god could he dance! Soon enough I realized that JSON is just a fancy term for something we all did in the past.  Paste data as dynamically created Java Script variables and paste it in the <HEAD> section for manipulations later.  Pagination was a serious problem we solved this way in the old days.   At the same time there was a bunch of nice libraries around JSON which made creating and managing data in this structure.  Open Source community had invested serious time on this front.  My jaws dropped and I learnt using Dojo for brilliant light UIs.  Alas that project did not last long.  Off job I learnt almost all the JavaScript developments till then including GWT – the write java get JavaScript magic from Google.  This knowledge helped in the next job.

The next Job had such feature rich UI that almost everyone refused to believe it is even a web application.  All that was made possible by some brilliant ui engineers using GWT.  The output was indeed bloated.  But it worked like a charm.  So once again I could nicely forget JavaScript and write stuff in Java.  Complacent days!

Two months back I opened my eyes and smelt some coffee.  My god – the landscape has changed A LOT.  There was something called Node.js that can take a JavaScript engine and run a web server off four lines of JavaScript code.   There are robotics that got controlled by javascript code.     There was PhoneGap which essentially is a packaging scheme that will take in javascript application written for one mobile platform and create one for every other mobile platform out there.  My jaws dropped again.

Currently  there are a dozen excellent UI libraries to choose from and people are all very passionate about each.  There are technologists dedicating considerable engineering skills towards JavaScript.  There are many languages and compilers that can compile stuff into JavaScript.  Looking at all these I was a bit confused.  Where is all this headed and what are the problems getting solved?

On the browser front it seems things have settled down.  It sort of is accepted that ‘thou shalt write template HTML’ with some {{funny_notations}} using Backbone.js or HAndlebar.js or somethingelse.js as your guiding force, Use JQuery, ExtJS or your next best friend’s java script widget library for display items and use ONLY Restful asynchronous callback backed server communication to do the boring stuff with data.  Also, thou shalt let your users socialize in all imaginable books are birds.  This pretty much seems like the end game for browsers as well as JavaScript on mobile devices.  With java script engines only getting faster and machines getting more cores and memory this seems like a scale with no limits.

The server side and beyond game still baffles.  Node.js has tremendous traction and some very bright engineers are already developing lots of stuff.  It still are the nascent stages.  There is at least one hosting solution r stopeout there with Node.js.  Once I put behind the idea that web servers are containers that hosts applications and think of those as stand alone applications that can receive requests in HTTP and reply back with data as JSON (or some other serializable format) it started to make sense.  I can see great scalable non blocking io using RESTful calls from various types of devices getting served by a server written in Node.js.  But isn’t this a problem solved many times over already?  For example using Jboss Remoting stack set I can write a standalone server that serves RESTfully over HTTP, Pure Sockets or in RMI in about 30 minutes flat.  Same goes for PhP also but I will need a container such as apache-httpd.  But here, Node.js also has a container, albeit hidden behind its shell – the JavaScript Engine.  Well, you know what, at this point, I don’t give a damn of the big picture.

All I am seeing is that it looks like an exciting new technology.  Some very bright people are investing time and energy and pushing stuff out into github selflessly.  The least I could do as an engineer it to fork it and hack at it and come back and share my experiences.  That, my friend, is exactly what I am planning on doing.  Learning should never stop.

One Thought on “Revelation.js

  1. Pingback: Revelation.js : 30days Progress Report « Boni Gopalan’s Blog

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Navigation