Skip to main content

Javascript - The Unlikely Hero of Technology

One of my favourite movie tropes is the "Unlikely Hero"*. He's got no superhero qualifications. And yet, when the chips are down, through moxie, guile, or just plain luck, he manages to save the world. Think Peter Parker (Spiderman), Sam Whitwicky (Transformers), or Neo (The Matrix).

In the world of technology, we have a new unlikely hero: Javascript.

Javascript started out life as a pawn in the browser wars. Netscape and Microsoft were adding ill-considered features to their browsers at a blistering pace, and Javascript looked like another me-too feature. But, fast forward to today, and Javascript is one off the coolest technologies around, solving problems that no-one dared to before. It's even solving problems for Trust IV. Let's find out why.

The Right Place at The Right Time

The first thing an unlikely hero needs is to be in the right place at the right time. In the case of Javascript, the right place is .. everywhere.

Javascript is the only language that's available on Windows, Mac, Linux, iPhone, iPad, Android, Windows Phone, and Blackberry. If you want a cross-platform app, Javascript is almost your only option**.

It's also starting to break free from the browser. The newest versions of Windows and Linux both allow you to write desktop applications in Javascript. And the Java Development Kit has included a Javascript interpreter as standard since 2006. Javascript's not just a browser language any more. It's a viable option for general purpose programming. It's even starting to appear on the server (more on that later).

The interpreter in the JDK has come in handy at Trust IV. We needed to stub out some missing infrastructure to test a system for a client. The system was MQ based, and Java already has great MQ bindings, but it was overkill for our purposes. Javascript came to the rescue, in the form of a short script that handled messages on the queues.

Help from Friends

Neo wouldn't have become 'The One' without the help of Morpheus, and Javascript has had plenty of help from its friends.

One of Javascript's best friends is Google. Google saw potential in Javascript. They trusted it to handle the cool interactive features on their sites. But, it needed help. Before 2008, web browsers had lousy support for Javascript. It varied between slow, and very slow. Google knew that they'd need Javascript more and more in the future, so when they released Chrome, it had the best Javascript engine available at the time.

Since then, all the web browsers have raised their game. Modern browsers all have fast, fully featured javascript engines.

But that was just the start. Today, Javascript's one of the fastest programming languages out there. Fast enough that it's not just web designers taking note.

One of the hottest technologies today is Node.JS. It takes Chrome's Javascript support, strips it out of the browser, and puts it into a high-performance event-driven web server.

Server-side javascript is popping up all over the place, including at Trust IV. We've been working on an exciting internal project (which I won't give anything away about), and server-side javascript is a large part of what makes it possible.

A Montage

Unlikely Heroes can acheive great things - often things they'd never have though possible - but sooner or later they come up against their own limitations. When that happens, there's only one way forward.. A Montage!

Through the art of the montage, the Unlikely Hero learns the skills he needs to fulfill his destiny.

Javascript got a long way on its own, but not without a certain amount of pain. Javascript is infamous for its awkward object model, clumsy and inconsistent standard library, and wordy syntax.

Fortunately, great programmers stepped up to teach it the skills it needs. JQuery finally gave Javascript an awesome API that worked in all the major browsers. Other projects, like Prototype.js, found ways to make its object model work (although in the same vein, Douglas Crockford taught people how to love Javascripts object model. It may seem awkward, but it's also very powerful. Think of Dustin Hoffman's character in Rain Man).

And, as ever, there's more. Today we have Javascript libraries for all sorts of things - graphs, games, rich client apps, you name it. The library support is so good that it's often easiest to write an app that runs in a browser. For so long, the easiest option was to write an app for a specific platform (a VB app on Windows, for example). Now, it's often easiest to write cross-platform apps.

This came in very handy on a recent project for a client. The client uses a bespoke system to track issues. It works well enough for incident managers, but it wasn't really designed with testers in mind. Making changes to the tracking system would have been difficult. Fortunately, Javascript came to the rescue. Thanks to KnockoutJS (a cool MVC UI framework), we were able to write a new front-end, which ran entirely on the client-side, with no changes to the server.

The Sequel?

The real test of a hero is simple: Does the studio commission a sequel?

There are plenty of challenges ahead - problems to be solved, villains to be defeated. And Javascript has competition, both from experienced old hands, and from young upstarts.

But, Javascript has confounded expectations before, and succeeded despite the odds. I'm sure it will again.

* Movie trope enthusiasts will notice that I'm really describing the Action Survivor. I decided that wasn't a catchy title.

** If you ignore some of the low-market-share platforms, there are few other options, but most involve a fair amount of glue code

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Enter the characters shown in the image.