Sunday, April 13, 2008

Competition is Good, even for Java

For about the last decade, a flame-war has existed in the Java camps:
  • Swing vs. SWT
  • Netbeans vs. Eclipse
  • Sun vs. IBM
You seldom read about the advantages of a diverse development ecosystem, and instead, the generalized perception is that competing Java libraries hurts the Java platform as a whole. I tend to take an opposite view; that the inter-Java component competition is a much needed and healthy aspect of the platform and will be the critical element for success in the future.

The following is mostly my own guess as to how things have gone down with the Java platform. I'm guessing that most of what I've written here is seemingly accurate, though undoubtedly there are some mistakes in the timeline and/or motivations of the interested parties. I believe this is close enough to the truth to be acceptable for the point I'm attempting to make.

From a likely naive read of Java history, it seems obvious to me that the competition between companies like IBM and Sun over the Java platform has strengthened the platform as a whole, created new options, more mature APIs, and has eventually lead to the opening of the Java source code by Sun in 2007.

For example, when IBM started to look at Java's AWT (Abstract Window Toolkit) graphic framework, improvements needed to be made to provide better fidelity with the native operating system underneath. AWT was basically judged as unacceptable by IBM for use in the development of its Visual Age IDE. AWT was clunky and lacked many features, and as such, IBM chose to develop its own windowing toolkit which did not rely on AWT and provided for better native OS integration. IBM came out with SWT (Standard Widget Toolkit) which, unlike AWT, had native renderings for the various graphic interface windowing components. SWT was fast and looked native.

Meanwhile, Sun pushed forward on the development of AWT by creating Swing, a light-weight layer sitting atop the AWT framework. With Swing, Java developers would have a very consistent API to developing moderately decent looking graphic user interfaces. Even with Swing though, IBM was not satisfied and was instead seeing great strides being made in its SWT platform, both in terms of functionality and performance. IBM stuck with SWT and Swing development slowed, mostly due to legitimate and fundamental criticisms over Swing (slow, kludgey, non-native rendering). IBM had picked the right horse to bet on, at least for the time being.

Today however, that perspective of the "right horse" is changing. A comparison is being made between the Eclipse and Netbeans IDEs (Integrated Development Environment) developed by IBM and Sun respectively. Netbeans, being based on Swing, has largely suffered from the original criticisms leveled against Swing, while Eclipse has been left rolling on highs as the king of Java development environments.

But recently, Netbeans (mostly because of the strong improvements to Swing) has made extrodinarily amazing gains in performance and functionality and is garnering attention from multiple technology critics, fairing well in comparison to Eclipse. Netbeans is now a viable competitor to Eclipse, possibly about even in developer mindshare. Eclipse vs. Netbeans is now the next Java holy war. Swing, once all but considered dead, is now extremely healthy and alive.

I have recently read a few forum postings and blog postings which say something to the effect that "Sun was right" to stick with Swing and that "IBM was wrong" to keep pushing on SWT. The comparison has primarily come from recent perceived performance problems in the latest versions of Eclipse, as well as the inability for Eclipse to run on all platforms as well as Netbeans. Swing has made significant improvements in the last two major Java versions; at this point, for most applications, it's as good as native applications.

In all this, what seems to be easily forgotten is that IBM was "right" to make the decisions that they did. At the time, AWT/Swing was just not viable. If Sun had been more cooperative with IBM, then perhaps SWT wouldn't exist. SWT has created good competition that Swing has been forced to mature quickly. And, fundamentally this is a good thing!

The competition between IBM and Sun has only pushed Java forward in a positive direction. Another example is the recent open source release of the Java framework. Previously, the Java source code was only available under a fairly restrictive license, but again due to pressure from other competitive sources (IBM, Redhat, Microsoft, Oracle), Sun has gotten all the parties to the table in order to open source Java in a GPL derivative license. The healthy Inter-platform Java competition has again benefited the Java ecosystem as a whole.

Ultimately, my hat goes off to the good folks at both IBM and Sun. I believe it's because of both their efforts (among many countless other organizations not even mentioned here) that Java is truly a fantastic environment to create a whole host of applications. I hope that the lesson learned is that free market values and the competitive spirit does indeed work to create better products. The gift of Java is a great example of this competitive and innovative spirit.

No comments:

Post a Comment