20060502 Tuesday May 02, 2006

AJAX: New Life For The Applet?

Duke is back!

Watching the comments David and Stephen have made about the use of JavaDB for Local AJAX as seen in François' demo, I'm struck by another aspect of the use of JavaDB in a browser. It signals a new life for the Java applet. The Applet was (in my opinion) killed as a mainstream browser technology by Microsoft in IE, and its crown seems now to be worn by Flash - sad because Flash is closed and proprietary

But AJAX brings fresh needs, and with them fresh opportunity. AJAX applications will have increasingly complex needs, and returning to the server every time to have them met will become increasingly burdensome. So how about some slim local helper classes to make life easier? The J of AJAX - JavaScript - conveniently comes with the ability to treat Java classes as a platform-independent function library. Most of the platform variance we saw first time round with applets involved graphics, but helper classes have none. Most of the bulk first time round was graphics, but this time round the applets are pure code. Could be a perfect fit.

What might they do? Some obvious things, like encryption, compression, validation and so on. But also some more interesting things are possible. How about a tiny Jabber server so the applet can use the local IM client as a log or command prompt? Perform XML transforms (in conjunction perhaps with WADL) for multi-host compatibility? An embedded web server as per Mark McLaren? And of course, a local SQL database.

As it heads for its teens, maybe the Java environment has a new life ahead of it, adding the power behind the scenes in rich-thin-client applications, putting the processing power into AJAX, offline and online?

Update: David Berlind continues the discussion on his blog.


technorati del.icio.us digg slashdot
Comments:

A new life for applets? Dear god, let's hope not!

Posted by Phil Wilson on May 02, 2006 at 06:31 AM PDT #

Hmmm... Flash is closed and proprietary? I'd say Java's almost as closed and proprietary.

There is a free software Flash player. There is also at least one open source Flash compiler.

The JCP is the one area that I see where Java is more open than Flash.

Posted by 143.127.3.10 on May 02, 2006 at 11:29 AM PDT #

Not only is Java closed and proprietary (and even ActionScript in Flash is based on ECMA-262), but IE and Microsoft didn't kill applets. Sun kills applets by making the JRE huge, the startup time killer, the user experience terrible, no direct JRE distribution for Mac, and inconvenient licenses bundling for bundling on Linux. (Way back in the day there was also a problem with applets never getting refreshed without restarting the browser.) And I have coded Swing applications before. I'm not just an anti-Java bigot. I'm just explaining the issues as I see them. I would love to see some of these issues resolved. And even resolving just some of them may be enough to make a difference.

Posted by Tom on May 02, 2006 at 12:37 PM PDT #

Hm, it might have been nice to know that my email address was going to be exposed in the comments. That's not exactly normal these days; someone at Sun seriously needs to tweak those settings. Also, I'm a full-time Java developer and at my workplace we're about to rule out rolling out an applet client for internal use only because the experience is so bad (basically everything Tom said).

Posted by Phil Wilson on May 02, 2006 at 02:21 PM PDT #

I think some of the comments here may be missing the point of this article. This is about a new way to use applets, the applet here provides no GUI interface and this is where AJAX and DHTML come in. This is not about providing a rich client via an applet GUI. Granted some of the issues mentioned still stand; startup time and JRE size issues for example but the user experience issue is no longer as relevant in this context. The way this applet is being used is not the traditional usage, this new mode of use is about the applet providing client side "web service" style responses.

Posted by Mark McLaren on May 02, 2006 at 11:39 PM PDT #

... or even no responses at all. This is just about Java classes serving as handly function libraries for functions that a DHTML application running in the browser needs. No Swing, no AWT. Maybe Applet was the wrong word to use. It's certainly brought plenty of urban myth to the surface from people!

Posted by Simon Phipps on May 03, 2006 at 05:34 AM PDT #

Mark and Simon - couldn't put it better myself... I have added some more context-related info on my blog: http://blogs.sun.com/roller/page/FrancoisOrsini/20060507 Cheers.

Posted by Francois Orsini on May 08, 2006 at 12:04 AM PDT #

Post a Comment:

Comments are closed for this entry.