I recently met with an engineering team to discuss their options for software technologies and languages. Like many technology companies, they are discovering the power of software in general and the power of the cloud in particular to dramatically improve capability and market reach for their existing products. They are not a software company, so they are looking for ways to capitalize on these benefits without a dramatic change or expansion to their core competencies. They were looking for the 80% solution. In other words, what do I recommend as a default technology solution that will solve 80% of the problems (and likely more than that)? With each passing day, my answer increasingly converges on a single important technology. I start with Javascript.
Sometimes a language is more than a language. Java is a great example of this. In some circles, the JVM is more relevant than Java the language. Virtual machines (VMs) are an elusive holy grail, and today we find ourselves with a new JVM: the Javascript Virtual Machine. Yes, the implementation is entirely different, but I’m loosely calling it a VM in this post. Folks are actually talking about javascript compilers. Believe it or not, it sometimes makes sense to compile C/C++ code into javascript using emscripten for the purposes of leveraging this “VM”. If that doesn’t turn your paradigm upside down, I don’t know what does.
To be perfectly honest, I am not a huge fan of the language. It is full of warts. Without the help of an IDE, it is a structural nightmare. With almost no constraints, developers are actually encouraged to spew unreadable messes and generally abuse the language. And I personally just think it’s ugly.
But then I remembered that the world isn’t perfect. And for the following reasons, I jumped on the bandwagon.
Javascript is a superior language. Out of the box, it supports nearly all of the advanced features of any modern fashionable language:
Maybe Douglas says it best.
Once javascript is mastered, productivity soars. That’s what these folks say, anyway.
This VM is showing up everywhere. It has already thrived on virtually every PC/Mac/*nix box for years now (browsers). Lately, the VM has found its way to other places too…
Node is a phenomenon. Even if you hate its guts, you can’t ignore the noise. As I write this today, node is beginning the slide into the enterprise early adopters. See here and here. These aren’t ignorant technologists playing with a toy language.
Need a lightweight REST API served by a technology that excels at IO-bound problems? How about:
Need a more traditional CMS that’s easy on the resources? How about:
Even mobile devices (smartphones and tablets, at least) have a full-featured VM installed. Today, it’s still pretty hard for these devices to do anything substantial with javascript, but who needs to do anything substantial? Not me. Not often anyway. Believe me, that leaves a lot of realistic possibilities.
Mobile browsers are starting to embrace more HTML5 features. Since javascript is the only language to realistically manipulate the DOM, an increase in HTML5 adoption will naturally drive javascript adoption and provide motivation for further performance improvements.
Many mobile applications lend themselves well to the hybrid approach. With the hybrid approach, applications are written in javascript and layed out in HTML5. Hybrid technology has come a long way. Today it’s possible to write an application once and deploy it on both iOS and Android.
Google and others have invested significant resources in improving the V8 VM. Others are making similar investments on the mobile platforms. It’s safe to say that the javascript VM is not getting slower. The same can be said about the hardware that runs it.
With software written in a single language, you have the capability to deploy where it makes the most sense. Services can easily be moved within the cloud environment. Business logic and algorithms can run on either the server or the client. This ability is nothing short of revolutionary.
There are many benefits if an organization can successfully focus on a single language, including:
Needless to say, the javascript community is strong and healthy. A simple glance at local meetups, open source projects, the blogosphere, and even enterprise blogs give a good indication of the momentum. Like any open source technology, this critical mass leads to a higher quality product.
Javascript is evolving and improving. The next release, ECMAScript 6, will eliminate some of the warts mentioned above while adding features that enable developers to leverage the strengths of the language more naturally.