Skip to main content

Why Java is going to succeed in the client side

Posted by elevy on February 21, 2007 at 6:15 AM PST

When Sun Microsystems released Java back in 1995, the big promise was that it was going to bring profound changes in the way we interact with Web applications. The amazing Applets were going to allow us to write multiplatform rich client applications deployed over the web, that would lead to a reduction of total cost of ownership.

There were several reasons why the Applets did not meet the expectations. I would have to say that it was in big part because of Microsoft’s strategy of not following the Java standards, and the creation of a proprietary JVM. However, I think that this is only part of the story. We should not forget the technology limitations of the time (CPU, Memory, and Bandwidth), and the lack of capabilities in the Abstract Windowing Toolkit (AWT) APIs.

Recently, I came to the realization that this is not over yet.
The availability of bandwidth, CPU power, and cheap Memory, remove some of the limitations that we use to have.

It seems like the trend is on AJAX technologies. We are developing rich client applications using HTML, Java Script, and communicating to the server using XML. Those applications are running inside a browser... it sounds way too much like what the Applets of 1995-96 where promising back then. It feels like a Dejavu.

How these AJAX applications are being developed?

There are different AJAX frameworks or APIs. IMHO, they are all extremely difficult to program with, to debug, and to test.
Some initiatives have realized those difficulties (i.e. Google Web Toolkit, and Echo), and to address those limitations they are producing a Java to AJAX compiler. You code with Java, and use a Swing-like API to create windows, components, and layouts. Then this gets compiled into JavaScript that ultimately is going to run in a browser..

If you take a deeper look into what those projects are doing, you are going to realize that they are reinventing the wheel. I believe that we already have that infrastructure in place, they are just trying to recreate it, and to make things worse, they are using the wrong technologies. I am a firm believer in simplicity. And for sure, compiling into JavaScript is not simple.

Java is here today, and it’s making that dream a reality. It is not applets anymore, but Java Web Start. It is not AWT but Swing.
Java Web Start allows you to run/deploy any application from the Web. It literally installs the application in your client machine. This way, the next time you access the application it will run locally with almost no delay (it will just check for a newer version).

I used to think that the Java Client Applications had to have an odd looking UI. If you looked at the early days of Swing, or any of the Swing tutorials, you will find the Metal Look and Feel. I thought as a developer that I was stuck with it, or the best option was to use the platform specific look and feels. BTW those never looked or behaved like the platform in place.

Later on, I found the Substance project. It seems like a huge amount of work, but still just out of the box the UIs would look with a very odd color combination selection. Well, I guess that you can customize the colors and make it look better, but I am referring to first impressions here.

I am pretty sure, that there is a lot of people who are still as wrong as I used to be. A deeper look into the APIs and the available Look and Feels allowed me to realize that the Java Rich Client Applications can have amazing UIs.

You just have to take a look at the the Aerith Java One demo to realize the things that can be accomplished with the Swing APIs, the Java 3D, and the Animation frameworks. It would be nice if someone would go ahead, and package that application into a more reusable framework. Perhaps, I will work on that some day.

There is the SwingX project which has a lot of interesting components. There is very little documentation out there, but the code is generally self explanatory.

I will write later on some of the components I have used (how I improved the Login framework to allow me to plug the “Waiting with Style in Swing” hack, but that's for another blog...).

I hope that the industry realizes everything I am presenting in this blog at some point in the near future, then AJAX will just be a transitory step in the evolution of the Web Applications and Java is going to rule in the client side.

Related Topics >>