Reinforcing the importance and ubiquity of JavaScript

Jack Galilee November 20, 2012

Last Thursday was JS Conf AU 2012. The first ever Australian JavaScript conference. Matthew Wratt and I represented Trineo at the conference, which had a series of impressive talks.

Why JavaScript

Although the talks had specific topics, they all shared one unifying theme, reinforcing that JavaScript is no longer a scripting language in the browser, and rather a language becoming capable of tackling any programming problem. JavaScript’s increasing speed and thus capability of replacing tasks traditionally reserved for server side libraries, client side, was highlighted by Alex Sexton’s talk on JavaScript’s role in internationalising web pages. While node.js has already solidified JavaScripts role in modern programming, it is important to look at why JavaScript outside of the artificial context of node.js, and to reaffirm the change and effect of how the JavaScript language is used client side.

It is underrated that the JavaScript runtimes have become fast enough to allow for the following statement to be true, “So there is this awesome C library that does all this stuff. Here is my Javascript implementation”. Alex Sexton gave a talk on internationalisation using JavaScript at JSConf AU. He discussed his experience to date, his learning process and finally his published solution; The Jed Toolkit. His original Jed library, which he now discourages using in favour of the Jed Toolkit, is an implementation of the GNU Gettext API. The fact it is even possible to defer something as complicated as internationalisation to the client shows JavaScript is becoming capable of adopting roles traditionally suited to lower level, performance critical libraries.

In the browser JavaScript is still thought of in the context of the manipulation and interaction of HTML providing interactivity to what is by design, a static document. While this is unavoidable in the context of the browser, the enhancements to the HTML standard, and the implementation of new browsers API’s have afforded JavaScript new use cases outside of document manipulation.

The primary language for the development of rich multimedia applications has typically been delegated to Java or C++. Alex Dickinson gave a talk on the use of JavaScript in emulating hardware, this means that a user can simulate a classical computer game console such as a Gameboy and use it, all from within their browser, all running on their machine. While Dickinson’s talk focuses on the use of JavaScript in virtually implementing the technical architecture of hardware, his examples used both the Canvas and WebAudio API to act as the virtual screen and speakers for the hardware he was emulating. JavaScript used in tandem with the graphics and audio libraries as provided by the Canvas and WebAudio APIs respectively allows for the development of multimedia applications which would traditionally be implemented using lower level language such as C++ or Java.

The next iteration of the JavaScript language

Brendan Eich, CTO of Mozilla and the inventor of JavaScript who gave a talk on the next iteration of the JavaScript langauge (ES6), used the mozilla developer demo Banana Bread (https://developer.mozilla.org/en-US/demos/detail/bananabread) to reinforce his case that JavaScript is no longer tied to the DOM. These examples certainly showcase that JavaScript has continued to dissociate itself from the context of HTML manipulation, as used in the browser.

If JSConf AU 2012 offered nothing else it was to reinforce that fact JavaScript isn’t going anywhere. It’s in everything, for good or for bad, and that its role as only a scripting language is continuing to change. JavaScript is becoming capable of tackling any of the problems faced by the modern developer. It is becoming increasingly capable of tackling processor intensive tasks that would typically be performed on the server, and for creating rich multimedia applications outside of what is thought of when associating multimedia and the browser.

Jack Galilee