When it comes to Java, the world is basically divided into two major groups: the Java technologists and enthusiasts, and the rest of the IT community. The enthusiasts are thrilled by Java. They just explore the capabilities of this new technology. Nobody has to convince them about how useful Java really is. On the other hand, there is the rest of the world. Judged by numbers, this is the much larger group. Many IT people only hear the buzz on Java, the Internet and Intranet. Perhaps this is a little exaggerated, but many people believe that Java means only ticker tapes, flashing images and Tic Tac Toe.
Yes, all those Java applets demonstrate an important feature of Java: Java brings dynamic behavior to the Web. Java animates a structure of linked documents that has been static ever since. For a short while there were some other non-Java methods around for doing this, like animated image collections for example, but they are limited in their capabilities. The same applies to vendor specific techniques for improving user interaction processing on the Internet. In this category fall techniques like client-side image maps, client pull, server pull, helper applications and browser plug-ins. All those things were initially brought to market by Netscape. Compared to Java these techniques have the major disadvantage of being platform dependent (or vendor-dependent). Java works on every Java-enabled browser, and there are a lot of them. Even MS Windows 3.1 now has a Java virtual machine, although it is still an alpha-release only.
Java is a fully featured, object-oriented, programming language. Applets execute on client machines and have a lot more possibilities than static WWW plus additional vendor software. Java applets do not construct the heavy net traffic that other methods do. Think of how you could efficiently use a distributed software system running on a net of globally interconnected computers. On Intranets, Java provides the ability to build fully platform-independent software systems. Java has a lot more value to you than flashing images alone.
Sun had several specific ideas in mind when designing Java. Its characteristics establish the foundation for Java's usefulness in business tasks. In the next section, I will present these features briefly and explain their impact on using Java. A large portion of my article is dedicated to possible business use cases for Java. I describe several interesting Java applets and stand-alone Java applications I found during my studies on the Internet. A catalog of Java applets and applications can be found in the Gamelan directory: http://www.gamelan.com. A recommendable place to go for Java exploration is JARS, a Java rating service with a monthly selection of best applets
Special Characteristics of Java Revisited
This section gives a brief overview of the important design features built into Java. These characteristics explain why Java is an ideal programming language for use in the Internet and in company's Intranets. I describe the impact of these special characteristics on Java's use in business environments.
Java is Object-Oriented
With Java you have a fully featured, object-oriented programming language. Moreover, Java ships with a large class library useful for many kinds of tasks and more handy business components are under development right now. The object-oriented model has already proved its value in software design. Thinking in object-oriented terms appeals more to the working of the human mind than conventional techniques. Object-oriented software designs are generally modular, flexible, and clearly constructed, and reuse of software components is strongly supported.
Java is Simple
Java contains all language constructs necessary to implement all possible types of software systems. In many respects, the language is similar to C++. However, some critical and error-prone features have been left out, like pointer-types and multiple inheritance. Java has a clear and well thought out design. Software engineers used to other OOPs will have no difficulties using Java. The language grammar of Java is easy to learn. I admit that mastering the comprehensive class library takes a little more time, but if you know how to program in Smalltalk, Eiffel or C++, you can do it in Java just as easily.
Java is Distributed
The class library that comes with Java, the Java net API, includes classes for building distributed applications over the Internet and Intranet. Due to security restrictions some of these features may not be available to applets. However an applet may show any HTML-document in the browser or communicate with the Web server it was loaded from. Java applets are often constructed as client programs communicating with a server application on the Web server. The client part does all the possible and useful work on the client machine before contacting the Web server. In this way a lot of net bandwidth can be saved. Stand-alone applications can make full use of Java's distributed capabilities. Combined with Java's platform-independence this is a major advantage over other programming languages, for example C++. There are already some Web servers written entirely in Java.
Java is Platform Independent
Because Java source code is compiled into an architecture-neutral byte-code, Java runs on any Java-enabled runtime system or Web browser. The only prerequisite is the existence of the Java virtual machine. This is Java's paramount advantage. The majority of other programming environments on the market today are restricted to specific system platforms. With Java hardware, decisions can be made separately from developing or using a software system. Moreover, with dynamic binding and dynamic loading of classes, Java is highly adaptable to changing requirements. Additionally, Java is an ideal language for rapid application development.
Java is Robust
Originally, Java was constructed for developing efficient software to be installed in electronic consumer goods. This idea is gone, but the robust design features built into the language stayed. Java lacks error-prone statements like memory pointers, for example. On the other hand, Java includes garbage collection and an integrated exception handling. The memory model of Java cannot be manipulated explicitly. During compile-time and runtime, several system checks are done automatically, preventing fatal system errors and making it harder for viruses to sneak into the code.
Java is Secure
Distributed software systems are more susceptible to malicious intent than stand-alone applications executing in a closed environment. This is especially true for Java applets loaded over the Internet. When surfing the net, users usually execute Java applets implemented by somebody unknown to them. Moreover, applets have to have access to some hardware and software resources on the client machine to accomplish something useful. The problem here is: how can I trust some unknown chunk of code? To make security breaches as difficult as possible several security mechanisms are directly integrated into Java itself:
- Java is implemented as a robust language
- A client-side Web browser creates a Java object called a Security Manager. The Security Manager cannot be changed by the user or the running applet. It implements strong limitations on any applet executed. For example: Other data on the client machine cannot be accessed and communication is restricted to the server the applet came from.
The Java security FAQ gives more background information on this subject. It can be found on JavaSoft's Web server:
Java Applets in Business
Java applets are useful in many different scenarios. They transform the Web from a static structure to a dynamic organism. One major use is in advertising, where dynamic animation gives WSeb pages a special look and feel. Java also is suitable for developing interactive user communication components. It is equally recommendable for global Internet or company-wide Intranet operation, because it is platform-independent and lets the client machine do most of the up-front work. The CGI-bottlenecks (CGI means Common Gateway Interface) encountered before can be avoided with the use of client/server systems implemented in Java. CGI scripts are programs (operating system processes) residing on the Web server. In practice, use of CGI requires a lot of Internet traffic between client and Web server, but constant client/server dialog is not possible.
Applets are embedded in Web pages (mainly HTML documents) and are loaded on demand. There is no installation process, changes are made by the developer and set into effect the next time the applet is executed by the user. This simplifies software distribution and maintenance.
Characteristic business use cases for Java applets are:
- Front ends for legacy systems, relational and object-oriented databases
- Managing interactive communication with the user, as in order entry systems
- Checking data the user typed in; a typical example is user account and password validation
- Dynamic user interface components like spread sheets
- HTML pages with dynamic and interactive content
- Dynamic text and images animation
- Dynamic maps and charts
- Multimedia and VRML
William Giel developed the two Java applets FOSSILA and Guestbook III that are now brought to market by WebWare (http://www.webwareonline.com). FOSSILA represents a sales information system (Figure 1). The applet has been designed to provide convenient access to product information and sales data via WWW. Instant support and feedback features are also included. When started, the applet opens a standalone FOSSILA window. FOSSILA interacts with the server through CGI scripts. It contains a secure transaction capability to post credit card data using encryption techniques. The layout and the content in the FOSSILA window are largely customizable through several provided parameters.
Guestbook III provides and maintains a browsable log of guestbook entries. It is updated immediately after a guest comment has been posted. The guestbook page is a HTML-document and resides on the WWW: This product requires a client/server design. The client is a Java applet, the server a standalone Java application. For installing the original version direct access to a Web server is needed. Now in cooperation with WebWare, William Giel offers personal Guestbook III free of charge. The personal version gives every user a space on WebWare's server where the guestbook pages are maintained. Moreover, Personal Guestbook III is configurable by the user through published applet parameters.
The next two examples show the use of Java for creating dynamic two-dimensional graphical applications. As a demonstration for the possible use of Java, Greg Brail wrote an applet presenting an interactive subway map. The applet alternatively displays the subway map of New York City or Manhattan only (Figure 2). The maps were supplied by Michael Adler.
The applet allows the user to find the shortest route from one subway station to another by clicking the subway stations in the map. The result of the calculation is shown in a separate window and the found path is depicted with red dots inside the map. The Java source code can be configured to navigate other subway and subway-like systems. This interactive subway applet has won an award from both Gamelan and the JARS (http://www.jars.com) applet rating service. This is only a demo version. The applet is not used by New York transportation.
However, the next applet is a real world application showing the graphical and dynamic capabilities of Java in business. The German city of Cologne now features an interactive tourist map of the inner city area (Figure 3). The URL for this place is:
BkmMapViewer has been developed by BKM Online Medien GmbH in Sankt Augustin, Germany. The applet consists of 13 Java modules with approximately 3500 lines of Java source code. It is designed as a configurable map viewer. The map and all other data may be exchanged and configured for different tasks. BkmMapViewer won the award "Applet of the week" in July '96 from the Java User Group Germany.
Java is also a very useful language for displaying virtual reality models (VRML). This feature is widely used in chemical and physical research done in educational institutions. One notable example is the molecular dynamics simulation created by Horst Vollhardt at TH Darmstadt in Germany. The applet is able to read different molecules (Figure 4). You can view this simulation on the Web at
The software company Dimension X has created a VRML toolkit entirely implemented in Java. It is called Liquid Reality. Liquid Reality consists of a set of Java classes. With the toolkit you can create viewers, tools and solutions that are VRML 2.0 compliant (Figure 5). Viewers and applications may work inside Netscape Navigator and Java applets. Recently, Microsoft licensed Virtual Reality for use in MS Internet Explorer and in future versions of Windows. Liquid Reality is still in beta. You may download a free version from the Dimension X Web site
Standalone Java Applications
Java is a fully featured, object-oriented programming language and therefore a direct competitor to C++. What makes Java unique is its platform independence, support of networking and integrated multi-threading. All general comments made in the applet section apply here as well.
Typical use cases for standalone Java systems are:
- Internet and Intranet software systems, for example, Web servers
- Distributed Client/Server systems
- Applications making use of TCP/IP connections, such as customized Web browsers and database front ends
- Multi-threaded parallel systems, such as real-time transaction systems
Many other software environments are suitable for constructing software applications (however platform-dependent these environments are). So naturally there is strong competition. Today standalone systems implemented in Java are few. Real world standalone Java applications are harder to find than applets used in business. Right now, Java is used widely in creating Web servers of more modern design. One example is Jigsaw, the new Web server of the W3C consortium in Boston. It is written entirely in Java.
Jigsaw is a full HTTP server. It is extendable by writing new resource objects. This is a more efficient replacement for CGI processes, but old CGI scripts can be handled, too. The integrated caching management reduces file system access to a minimum. Jigsaw is still under development but is available to the public as an alpha release and may be downloaded from the Internet. The server will run on any platform supporting Java, of course. There are also some additional white papers on Jigsaw. A mailing list is installed.
A competitor for Jigsaw is Jeeves by JavaSoft. Jeeves is also an Internet server and a framework for an extensive family of Java-based network services. Jeeves defines the new Java Servlet API for easy creation and management of Java-based network servers. It is still in alpha state too. The available version is named a technology release. It may be downloaded from JavaSoft's Internet server
http://www.javasoft.com/products/jeeves) for evaluation use.
Not much more can be said here. I hope I clearly explained the additional value that Java contains for Internet and Intranet applications. I could only describe a small number of typical Java applets and applications here. Many more are on the Web and will continue to evolve in the future.
About the Author
Claudia Piemont is a German freelance computer science journalist and writer with a degree in Computer Science. She has a broad knowledge of software engineering, object-oriented technology and Internet/Intranet issues based on practical experience in her work as a software developer and consultant.