Chapter 21. Java

Java has become the standard language for writing server-side applications, and for good reason. Let’s take a look at Java performance and the Web.

Java Will Never Be Good Enough for GUI Applications

Netscape tried to rewrite its browser in pure Java and failed. Corel tried to rewrite Word Perfect in Java and failed. The HotJava browser was unbearably slow. Most Java Development Environments are not written in Java. In fact, there are no successful commercial Java GUI applications as far as I know. The variability of clients is too great to allow enough optimization, and virtual machines (VMs) are too big to be quickly loaded and started on demand. This does not mean that there were no successes with Java on the client side. For example, there are applets that display continuously updated stock quotes that are quite useful and effective, but this is because they are very small.

Note that the DOM extensions to HTML now make most things you can do in Java possible from a non-Java browser, such as fractional downloads, 3-D graphics, column sorting, etc. In summary, if you can possibly use HTML in a browser for your GUI, is would be unwise to write an applet or application to do the same thing at greater expense and lower performance. In fact, Java is no longer a standard component of the Netscape and IE browsers.

Java Is Good Enough for the Server Side

On the other hand, Java has been a great success with corporations doing server-side development on cheap Linux ...

Get Web Performance Tuning, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.