Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

Java: It's a good thing

Why Java isn't slow, ugly, or irrelevant

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

Page 2 of 4

The second and third items in the above list are related. Java's heavy resource consumption and sluggish execution speed make it score poorly in this area, especially on older computers. However, with careful programming, you can obtain acceptable results. In the case of the Java MD3 Model Viewer open source project I recently worked on, few people complained about the performance of the Java-based program; in fact the feedback I received was on the contrary.

This brings me to a related issue that Garfinkel strikes upon in his article. Careless programming can produce bad results in any language. Given that Java is not as fast as C by design, Java programmers should be especially careful to produce efficient code. Having lots of inexperienced programmers writing key Java code doesn't help the situation. In this case, time is on Java's side. The number of highly skilled Java programmers will grow, computer power will increase, and Java technology will continue to mature.

Regarding the fourth item above -- clean integration with Windows -- it is a fact that almost all desktop applications run on Windows. In a Windows-dominated world, platform independence is not a big advantage. And because of Java's platform independence, it integrates less seamlessly with Windows. This is one of the reasons why I feel that the discontinuation of Microsoft's J++ is unfortunate. That environment provided a way of writing Windows-specific programs in Java. To replace J++, Microsoft is currently developing C# (C-Sharp) -- a language many Java developers may find similar to Java.

But all is not lost. There are numerous application domains where the requirements mentioned above do not play, or at least, are less important. I will discuss those further.

Write once, debug everywhere?

Does Java's "Write Once, Run Anywhere" slogan really translate to "write once, debug/test everywhere" in practice? In my experience, no, it does not. Sometimes the small differences between Java implementations do indeed matter and need to be taken into account during development. This is again primarily the case in developing desktop applications. Having your user interface behave the same way on all platforms can be a daunting task.

For most programs wherein the user interface is not a key part of the application, Java's platform independence does work nicely. If you keep a few rules in mind, like calling yield() to make your threads behave properly on OSs with cooperative multitasking (e.g., Mac OS), you're likely to have very few problems. Sure it's possible to write portable C code, but having a rich set of portable APIs at your disposal in Java makes the task much easier. Further, Java's standardized and portable execution model using a virtual machine saves you from having to deal with the different ways in which operating systems load and execute binary code. All of this makes Java's platform independence a real improvement over what existed before. As such, Java is definitely a necessary technology.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources