Now that the worst of the ‘browser wars’ finally seems to be behind us and now that JavaScript can easily communicate with servers to get data without page re-freshes via AJAX one has to wonder if there are any real uses left for applets. My conclusions would be that yes there are still some uses for applets on the web but they are few and far between. Anyone who uses an applet in this day and age should have a bloody good reason to do so because your browser should not have to load a JVM just to view a web page unless that JVM is providing something spectacular that actually adds something to your page and that cannot be done with the core web technologies (XHTML, CSS, JS, AJAX).

OK, I’ll be honest at this point and say I HATE web pages with pointless applets and always have. There are a number of reasons for that, firstly, loading a JVM slows your browser down, secondly applets tend to be slow to load and they tend not to be half as cross-platform as people are lead to think. Then you get into the accessibility issues, the semantic web issues and the text-only browser issues! An applet breaks up the logical structure of your page and if you use one for something as critical as a menu you should be lined up and shot! “because I can” is NOT a valid reason to inflict applets on your visitors! My line on applets has always been that you had better have a darn good reason to use the bloody things or you are a bad web designer.

Even before the days of DHTML and AJAX I was already on an anti-applet crusade. The vast vast majority of applets you see on the web are used in retarded ways for stupid things like navigation menus, animated logos and pure fluff like the ripple applet that used to be so popular (like this example). In the past I would have argued that this is putting looks over usability and hence stupid but in this day and age it is just stupid. If you want a nice shinny menu use DHTML, to get some idea of just how sexy your DHTML menus get these days check out this post in Dave C’s blog. As for rippling water and other animated logos etc, have these people never heard of animated GIFs?

In the past I used to say that it was acceptable to use an applet for something that required a lot of user driven communication with a server, that is now no longer the case, AJAX is the way to go for that now (see this post in Des’s blog for a quick tutorial on AJAX).

I also used to believe that any application that involved manipulation of graphical elements in some real time way like a game or a WYSIWYG editor to create mind maps or some such could not be efficiently done without an applet or flash but again I was wrong. I realised I was wrong when I wrote a WYSIWYG editor for building surveys with DHTML 2 years ago but I didn’t really realise quite how wrong I was till today when I played DHTML Tetris!

So, are there ANY uses left for Applets? In my opinion, yes, I can still think of two kinds of web apps for which applets are a good solution. Firstly, I think applets are still the way to go for interactive simulations like the ones listed on this page. Secondly, applets still have a home on any web app where the server needs to push information to the browser instead of the browser pulling data from the server. DHTML does not really provide us with a proper mechanism for pushing data to a loaded page in the browser and some web apps need that ability to work well, applets are a good call for such apps IMO.

Bottom line, the need for applets is ever diminishing and hopefully it will be totally gone some day soon!