Monday, April 14, 2008

Java Applets Don't Run In Browser Anymore

If you had your Java textbooks tell you that "Applets are defined as programs that run in the browser", then you probably have to get a new revision of that textbook. Probably even authors and Java gurus need to change their definitions and refresh their ideas. And all this because from Java 6 update 10, applets will be able to execute on a process outside the browser through a nice new plugin.

Java 6 update 10 brings a whole new paradigm of applet development through the use of a new plugin for browsers. The applets running through the new plugin will feel like they are running inside the browser, but actually are executing on a different process outside the browser. The idea is that there is a lot of baggage that Applets carry when executing within the browser, thus slowing the user experience and taking an awful amount of time to load. The new browser plugin is supposed to work on:

  • Internet Explorer 6 and 7 on Windows XP and Windows Vista
  • Firefox 3 pre-release builds on Windows XP, Windows Vista, Solaris and Linux

The plugin does not work with Firefox 2, but Sun Microsystems expects someone from Mozilla to backport it. Opera, Safari and other people need to talk to Sun to get the plugin implemented. There is also a feature where you can switch between the old plugin and the new plugin. It all depends on which one do you want to use.

Applets have been a failed bet on Sun Microsystems part and you won't find many takers for Applets on today's Internet. Not that its a bad thing to use, but probably its download time, slow startup and not-so-seamless integration on webpages, made it a miss rather than a hit. Applets were supposed to be the defacto for active documents, but somehow didn't turn out to be that way. This is another push towards active documents or web deployed applications, but this time probably its more JavaFX.

The Kernel and Improved Updates

Another problem Java deployment generally faces is that it needs the JRE (Java Runtime Environment) to be deployed first on the client machine. Any update to JRE is a huge download and the size has been increasing with the addition of new APIs. A new feature, part of Java 6 update 10 (Java6u10) is the "Kernel" which only includes typical components required for your programs. It is a small package of 4-5 MB instead of the regular ~20MB.

JavaDwnld KernelDwnld

Download and Update Improvements

The complete list of new features can be found here. You can download the Java 6 update 10, which is still in beta from here and decide for yourself if its the right thing for you. I have downloaded it and from my assessment it seems to be an excellent release. Applications are a lot faster and cold startup of Java applications have improved dramatically.

The guys from Sun mention that its the biggest update release of Java that they have ever shipped without the API changes. One thing I love about Java and JRE is that they have improved the API quite a bit, but don't make the old programs incompatible. I hate the way for .NET we had completely separate v1.0, v1.1 and v2... for the .NET Framework.

Finally all the new improvements to JRE feels like the year2000 internet boom prediction where everything on the web is going to change. Silverlight, Adobe Air, JavaFX Script, and many many more technologies are all lined up to take the developer share. Which technology will rule in the end is a tough call to make, but this time all the buzz seems more real than the last bubble!!

3 comments:

Prashant Jalasutram said...

Saptarshi,

Good interesting blog and Keep it up Man.

I found your profile very inspiring.

Thanks
Prashant
http://prashantjalasutram.blogspot.com/

Anonymous said...

Saptarshi Sir, Sagar here... Thanks for pointing out the changes coming to the applets model. Radical but useful change... But isn't it also going to affect some security model of applets. Isn't applets becoming the new WebStart ??

Anonymous said...

JavaFX Script isn't comparable to the technologies you mentioned... JavaFX script is in development for such a long time and it still sucks whereas the newer Adobe Air is performing a lot better. They release the Air 1.01 and its lot better than JavaFX