Java Applets

Java applets are useful for creating animations, for displaying images with sound background, for graphics effects, and for interactive things such as games. Java also allows a designer to create applets that interact with a server side database without the need to resort to CGI.

Java Script

JavaScript's most useful capabilty is support of forms processing: it allows for immediate checking of data entry with interactive feed back when missing, incomplete, or incorrect fields are submitted by the user. In conjunction with CGI handling of corrected submissions, this provides a powerful tool for database maintenance..

JavaScript is useful for differentiating amongst browsers, so that HTML code can be customized to browser idiosyncracies. It is also a powerful tool for handling of events, such as mouse position and click. This latter enhances its usefulness in forms processing.

Advantages

As mentioned above, Java permits direct database operations; i.e., without the need to resort to CGI. There is probably nothing that JavaScript can do that is not doable in Java; the reverse is not true. However, JavaScript is always a better choice for things that it can handle for the following reasons: