John Resig makes the case for standards-based Rich Internet Applications

John Resig is a brilliant developer who is the creator of JQuery, a fast and lightweight JavaScript library. He is also JavaScript evangelist at the Mozilla Corporation. He spoke here at The Future of Web Apps on the future of FireFox and JavaScript.

It was a fascinating presentation which demonstrated that it is not just Adobe (Flash, AIR), Microsoft (Silverlight) and Sun (JavaFX) who are in the Rich Internet Application game. Resig began with a tour of new features in JavaScript 2.0, most of which was familiar to me as it seems to be essentially ECMAScript 4.0 a.k.a ActionScript 3.0. In short, JavaScript is becoming more like Java, complete with full object orientation, optional strict typing, and a Just-in-time (JIT) compiler. Adobe has donated much of its code for the ActionScript runtime, in the form of the Tamarin project, which will eventually be part of FireFox 4.0.

My interest perked up when Resig started talking about three monkeys. These are:

  • Action Monkey – Tamarin in FireFox 4.0
  • Screaming Monkey – Tamarin in IE, via the Flash runtime, enabling developers to use it cross-browser
  • Iron Monkey – Python and Ruby for Tamarin

This was new to me. Resig continued by showing some of the work Mozilla is doing to support advanced graphics and multimedia. The Canvas element in HTML 5 interacts with OpenGL to support 3D effects. There is even the possibility of embedding C code in the browser for raw performance, though the security implications mean this is unlikely to be used for general Web pages. Resig also showed generic audio and video support built into the browser. This will integrate with SVG, and we saw how live video can be played back in SVG elements even while they are being dragged around a canvas. Just like Microsoft demonstrates for Silverlight, as it happens.

After showing us how Mozilla might make Flash and Silverlight unnecessary, Resig went on to tackle offline applications. He told us that Mozilla is working to “converge” the three popular offline APIs – Mozilla’s own, Google Gears, and WHATWG. “A final amalgam will be in FireFox 3”, he said.

Resig also described plans for offline applications. This includes Webrunner, a desktop host for XUL applications, and Prism, which lets you install a web application as a desktop application. XUL is Mozilla’s XML user interface language – analogous to Microsoft’s XAML and Adobe’s MXML.

None of this is coming out soon. By the time it does, won’t Adobe and perhaps Microsoft have wrapped up the market for rich multimedia in web applications? And isn’t Mozilla on collision course with Adobe, despite the Tamarin collaboration, since much of what Resig demonstrated competes with Flash, Flex and AIR? After all, Adobe ceased supporting SVG after its acquisition of Macromedia and thereby Flash.

I asked a question about this, and Resig answered tactfully:

Adobe and Mozilla are two separate beasts. They sometimes have very similar goals, like getting the Tamarin virtual machine out. Sometimes the goals differ a bit. We have a pretty good vision of the open web as a viable platform for anyone to develop on. HTML, CSS, JavaScript. This is the core that people should be developing with.

It would be great to see Mozilla disrupting the progress of these two proprietary internet plug-ins, Flash and Silverlight, by providing an open alternative, but it does look as if it will all come too late.

Update: Resig has posted his slides here. He has also clarified the timing:

Of the features mentioned in the presentation, the ones that are coming in Firefox 3 are: SVG Foreign Object, Offline Web Apps, Webrunner/Prism, and JavaScript 1.6-1.8.