While many smaller companies had built quality widgets and applications in JS it is was the entry of Yahoo Widgets, and more importantly the that of Google Mail, Calendar, etc. that laid the commercial foundation for the Ajax revolution with a plethora of frameworks and tools. Rather than bulky and complex web standards, more and more of these toolkits support simpler Restful style services that use JSON rather than SOAP.
Web 2.0 – The Push for a Faster, More Robust JS in the Browser
The Browser as a platform for Web 2.0 and a software as a service application delivery system requires a robust JS that supports the execution of complete applications. It is well known that the initial implementations were not designed as high performance VMs and that the GCs were problematic. The race to improve JS was kicked off by the Mozilla SpiderMonkey implementation, which demonstrated that JS performance could be improved. Several popular Web 2.0 sites quickly showed that the IE implementation performed poorly, making Firefox a more attractive web platform. This of course had MS racing to put new legs on its JS implementations, which were announced in March at the Mix conference.
2 JS ICING ON THE CAKE - UNIVERSAL LIGHT WEIGHT RUNTIMES
Silverlight and the Dynamic Language Runtime
Silverlight is the recently announced lightweight CLR implementation with an associated subset of the.NET framework that runs in the browser. Silverlight extends the reach of the MS CLR beyond IE and Windows. More impressively, it allows MS Visual Studio to be used to develop and debug applications running in non MS browsers running on non Windows platforms. MS has demonstrated IronPython and IronRuby implementations of these popular scripting languages as well as JS implementations.
Scripting Language Execution on the JVM
At last it appears that Dynamic Languages may finally be worthy of consideration by the Java community. Efforts by researchers and implementors at Sun have demonstrated the viability of the approach and are adding the machinery to improve Java execution.
The Sun Finally Shines on Dynamic Languages
In Java 6 Sun has introduced two JSRs specifically intended to improve Java as a scripting platform. JSR 223 makes it easier for Java based scripting languages to interact with existing Java classes. This will improve JS execution with Rhino, the popular JS implementation used on the JVM. JSR 292 introduces a new bytecode invokedynamic that supports efficient and flexible execution of dynamic method sends. The good work by the JRuby team at Sun demonstrates that dynamic languages such as Ruby can be implemented quite efficiently on the JVM by using a combination of compilation and proven VM implementation techniques such as inline caches. Through the use of tricks used in Smalltalk and Self as well as type inference and selective compilation it is now possible to script server side applications using JS or Ruby.
Google Reviving Rhino?
Google has recently been an active contributor to Rhino, the open source JS implementation on the JVM. Although it is doesn't support the current standard perhaps renewed efforts will bring it in line. It should be enabled through Java JSR 223.
More impressively, Google has recently demonstrated the implementation of a Rails like framework Rhino-On-Rails using Rhino JS. A recent blog post by Steve Yettes has spiked rumors about Rhino at Google. However, if Google does do something it would seem more likely to leverage its Smalltalk, Self and Hot Spot expertise given Google's VM wizards such as Jeffrey Dean, Urs Holtz and Lars Buk, etc. This would provide a better client and browser side story that didn't mandate a JVM. Perhaps there is a Hot JS on the horizon, when it comes to Google anything is possible.
IBM Project Zero?
Rather than leveraging the true open source community that made IBM a mainstream player with Eclipse, IBM seems to be playing bait and switch with bogus community style licenses for Project Zero and Jazz. This has the potential to take IBM from OSS leader to loser, especially if in doing so they alienate the good will and support of the Eclipse community, which has supported IBM in its tooling and runtime efforts.
3 ECMASCRIPT 4 – JUST SAY NO!
Quietly, while no one was watching or caring, it appears that Adobe and Mozilla hijacked ECMAScript and are now driving forward with a monster disguised as ECMAScript 4. The open reference implementation is a nice idea, but it is hardly a proven approach for defining a language standard, especially with a C based implementation2. One may argue that it worked for C# and JS however these were already defacto standards and they were not designed by committee.
Just browsing through the wiki shows a language which has prototypes, classes, multi-methods?, static types, dynamic types, etc, etc. This reminds an old guy like myself of other large design by committee languages such as PL/I, Algol 68 and ADA. These ambitious efforts all had smart people involved in the design and implementation but were unfortunately far too complex and came to the market too late. JS is intended to be a language for the people, not another language that only technical wizards can understand. If you are an Ajax developer or care about dynamic languages I suggest that it is time for you to speak up and help put ECMAScript 4 on a much less ambitious path than is currently being charted. Less is truly more when it comes to languages.
4 JS AS A PLATTFORM!
There are numerous JS UI frameworks which enable developers to "target" JS in the browser for delivering applications including Google Web Toolkit (GWT), Yahoo Widgets and various Ajax frameworks. A more ambitious approach is used by Morfik's JST, which compiles applications developed using their UI builder and Basic, C#, Java or Pascal into JS Ajax.
A similar project, JSC is an experimental project to compile C# to JS.
Unfortunately, JS is not without its problems, one of which is the security risk exposed in XMLHTTP and JS/DOM interactions. These problems are due more to the DOM and Browser however. The Browser in particular is larger than many operating systems!
Sun Lively is billed as a WebOS in JS. Lively leverages the impressive Squeak Morphic graphic framework to deliver applications on a JS + SVG platform. Lively is inspired by Dan Ingall's work on Smalltalk and Squeak and no doubt by Dave Ungar's work on Self. It provides an open, live programming experience in which the running code can be edited on the fly. The use of vector graphics enables rich new UIs that go beyond classical widgets. This brings to mind Sun NeWs, which pioneered the use of programmable vector graphics based UIs using Display Postcript and was used heavily in NextStep.
It also appears that we may finally be moving away from platform-dictated UIs and windowing systems to richer UI experiences tailored to the needs and expertise of the user. I look forward to the IT community waking up to find that while they were lost in the complexity of SOA, end users are already using their own enterprise application integration and workflow orchestration as a restful and easy to use Mashup!
1 JVMs in a “Software as A Service” Environment? It is interesting to point out that the JVM community is very silent about memory footprints of Java versus C based JS, Ruby, PHP or Python in a hosted software as a service environment. I'll bet Sun and IBM are very busy trying to figure out how to get Java starting a lot faster and sharing a lot more code!
2 It can be very difficult to develop tools or independent implementations if the syntax and semantics are encrypted in C. PHP and Ruby are just two recent examples where it has proven difficult to understand the grammar and semantics from the reliable and very useful de facto reference implementations.
About the author