JavaScript, a rising star

I didn’t notice the JavaScript phenomenon until recently. Although I started using JavaScript on Netscape4/IE4 when web was still new, and did some Ajax for a while, JavaScript has always been a supporting role in my mind, some auxiliary tool to enrich user experience and cope with browser deficiency.

I’ve written production code in C/C++, Perl, Python and Java programming languages (plus HTML/CSS/JavaScript/ActionScript) for years. To me, JavaScript could never be at the center of the stage. It looked so unstructured, unpolished and ad hoc. However, after digging further recently, my view changed completely. I not only realized its merits, but also considered it a rising star: it could play a central role in the years to come.

Firstly, the language itself is very expressive if we avoid its “bad parts”. (Douglas Crockford talked it quite well in JavaScript: The Good Parts.) Some good things include first-class functions, powerful dynamic objects, terse object/array literal, and the event-driven (asynchronous) nature. The last thing is particularly important IMO and makes JavaScript prominent among popular programming languages. If it prevails, that could be the main cause.

Secondly, its sever-side development momentum triggered by node.js is growing fast. For a long time, JavaScript is limited to web browser environment. Server-side JavaScript existed but never aroused enough interests. It has changed. Some companies are building serious node.js applications. For example, Rackspace switched from Python to JavaScript in their new project (link); Yahoo! is moving toward node.js through its Mojito initiative. Combining the asynchronous nature, JavaScript is very competitive as a server-side language.

I didn’t really get the significance of asynchronous/event-loop/non-blocking until I read across a good blog post: Why node.js is cool. It reminds me the pains I experienced in my earlier Python project, a distributed job dispatcher to do massive text data processing on 100+ Linux boxes. Basically, for tasks involving external coordination where JavaScript shines, traditional synchronous programming languages are cumbersome. As the internet marches toward a more interwoven world, JavaScript fits well at both the browser and server sides. Another sign of the JavaScript momentum is GitHub Top Languages page.

I just watched Crockford on JavaScript – Scene 6: Loopage again, and comprehended better than last time. (BTW, it’s a pity this great guy left Yahoo!.) Though it takes a short while for server-side JavaScript to mature, it is very promising.

JavaScript, a rising star!

This entry was posted in JavaScript, Software and tagged , . Bookmark the permalink.