Not necessarily. Java is a programming language. When work began on what has become Java, the World Wide Web was just getting started at CERN; and Mosaic wasn't even a glint in Marc Andreesen's eye. The original use of the Java language (settop boxes) required security and the ability to execute code from untrusted hosts. It turns out these are virtually the same requirements for allowing people to download and run programs from the Web. No other language has the built-in security of Java. The key here is the security features. The object-oriented nature of Java is secondary, and mainly reflects the preferences and prejudices of the developers who set out to write a secure language. The C-like syntax of the language is even less crucial.

At the lowest level the advantage of Java to the web is that it provides a secure, cross-platform way for code to be executed. At a somewhat higher level Java adds several features to existing web sites:


Arbitrary Graphics
Java lets the server draw pictures in a window on the client. In theory this allows a web page to do anything a regular program can do by drawing in a window.


Arbitrary Data Types
In practice rather than using graphics primitives to create your desired web page you'd use a graphics program to draw the page and then write a program that could read and display the file formats of that program. Java lets you write content handlers that display any particular data format. This way you can download your data and your data display program rather than downloading a bitmapped snapshot of the display. People are already using this to add sound and animation to web pages. Rather than having to download a file and spawn an external viewer, the viewer is included with the data; and the data is displayed right on the page.


Less Load On The Server
CPU intensive cgi-bin scripts place a large load on a server, particularly at busy sites. With Java you can off-load the calculations to the client's PC. I've written an applet that calculates all possible ram configurations for a given Mac model. However on models with many memory slots the sheer number of permutations can tie up even a fast machine for several hours. Publishing this as a cgi-bin would bring my server to its knees, but by publishing it as a Java applet I can distribute the load across all the machines that want to run it.


More User Interaction
Finally Java allows for more interaction with the user. Java not only allows you to paint arbitrary data on the screen. It also allows you to collect input from the user in the form of mouse clicks, keystrokes and the like. This lets you put almost any application on your web page that doesn't require disk access.

Posted in: Java

Related FAQ's

Marius Ion ANGEL HOT SOFT LLC (800) 316-7677