Few scripting languages are as polarizing as JavaScript. But love it or hate it, it’s hard to debate the fact that JavaScript has had a renaissance of late, making it the lingua franca of the client-side Web. JavaScript performance has exploded in recent years thanks to an arms race among browser vendors to build the fastest JavaScript engine, and the server side now has a powerful scripting tool in Node.js.

Further fueling JavaScript’s resurgence on the server is the fact that every browser vendor seems to have concocted its own superspeedy tool to run JavaScript faster than ever. These new engines are easily 10 to 20 times faster than the ones from just three or four years ago. The Node.js team took one of these engines, V8, and produced the stellar throughput that drew everyone’s attention back to the server.

But JavaScript’s bread and butter remains on the client, where developers are building powerful capabilities using elaborate JavaScript libraries that smooth out the differences between browsers. These ambitions have been made possible in large part by jQuery, which is now so ubiquitous and stable that many people might be said to be programming in jQuery not JavaScript.

This vector is also giving JavaScript an increasing role in smartphone programming. While many developers who need very responsive interfaces swear by native code, a number of people with simpler, less performance-dependent requirements are turning to JavaScript frameworks such as Sencha or jQuery Mobile. This code can be hosted on a Web server or be bundled into an application using the open source project PhoneGap.

The first, HTML5, relies on JavaScript to move things around on the page; because of this, programmers are getting better at using browser-based JavaScript to catch up with what Flash programmers used to do. Sprites and animations that were once the main advantage of ActionScript are relatively simple to set up in HTML5. Every convert to HTML5 is reading and writing JavaScript, not ActionScript.

The iPhone remains a challenge for Adobe and ActionScript lovers. Apple’s long resistance to the platform means that ActionScript authors can’t write ActionScript and expect it to work in the iPhone’s browser. Of course, that doesn’t mean the platform is completely closed. The clever programmers at Adobe built a “packager” that turns the ActionScript in Flex and AIR bundles into something that runs in a native app.

Will this be enough? A startup called Ansca also makes Corona, a framework for building iPhone apps that uses Lua, a language the company promotes as being very close to ActionScript. The ideas live on even if they’re not called exactly the same name.

If its use by high-profile startups is any indication, then Scala is on the rise. Running on servers at Foursquare and Twitter, this functional language brings type-safety to the JVM, meaning it can run wherever the JVM works, including Android phones.

Scala is bound to attract more attention as people begin to unpack the lessons from Node.js. Much of the speed and success of Node.js are due to the way it brings a functional programming approach to a stripped-down processor.

That said, the book market suggests that Scala could remain a niche market. Only time will tell whether the general developer populace will follow their startups’ Scala lead, but the language shows growth potential among the more experiment-minded set.

Update 2015:

 

Javascript & Beyond

Leave a Reply