Skip to main content.

Web Based Programming Tutorials

Homepage | Forum - Join the forum to discuss anything related to programming! | Programming Resources

Tricks of the Java Programming Gurus

Chapter 35 -- Taking Advantage of the Internet in Development

Chapter 35

Taking Advantage of the Internet in Development


The Internet provides developers with nothing less than revolutionary means for looking at application development. Many of the early attempts by pc software vendors in Internet development have reflected a clearly pc-centric view of the way applications should look. The people who find true success in building Internet-conscious applications will be the ones who shed their pc-view of application development and make use of the resources the Internet provides to their fullest.

Java fits into the Internet picture as the first tool to enable developers to make use of the resources of the Internet. Certainly, it will not be the last. This chapter focuses specifically on how developers can use Java and the Internet to rethink the manner in which applications are built.

Ending the Isolation of the pc

Since home computing began, traditional pc software, such as spreadsheets, word processing programs, and graphics applications, has been packaged and sold to users as a complete solution. Such applications really have depended only on the underlying operating system and nothing more beyond themselves. Although in recent years vendors on certain platforms have been able to provide minimal inter-application compatibility, a word processor program still ships with a spell checker, clip art, minor spreadsheet capabilities, templates, help files, and assorted other components that are not directly related to the task of word processing.

With an unconnected pc, the bloating of simple applications into software behemoths is necessary. The application vendor cannot assume that the user has any particular piece of software other than the one that it is selling. If, for example, a word processor were shipped without a spell checker in the hopes the user already had one, that user would be very unhappy with the vendor upon finding out that spell checking was impossible.

Building applications for the Internet, however, ends this isolation of the pc. When writing an application geared toward a connected machine, developers can centralize resources and place on the end-user machine only the pieces of an application immediately relevant to the task at hand. Additional resources can be requested and found as needed in a known location on the Internet.

The application is not the only thing liberated by the Internet. End users are drawn together and able to make use of the same centralized, distributed applications. In addition, companies on the Internet are freed to create unique, more user-friendly revenue schemes to replace the old licensing scheme that the Internet makes obsolete.

Working and Playing in Groups

Netscape has rendered the hostile landscape of the Internet into a massively hyped common network, giving users point-and-click access to all the capabilities reserved in the past solely for scientists. Though the browser made everything on the Internet more accessible and increased the pure volume of information on the Net, it has not yet significantly changed the nature of what that information is. People are still only testing the waters at this point, using the Web as nothing more than a source of entertainment and research.

Java is the ticket both to changing the way the Internet is used and the way home users use their pcs to work with one another. Though any sort of collaborative effort can be greatly enhanced through Internet-aware tools, most such efforts still use mostly e-mail and file transfer to get work done. One place we can change the way we work together and the way we use the Internet is in education.

Distance Education with Java

The traditional classroom brings people together in the same physical site to learn from a teacher or from each other. As simple as this process has proven to be for centuries, it has some serious drawbacks:

Many rural states have tried to solve this problem through video-conferencing. Using video-conferencing technology, students come together in a single or, in well-funded instances, a few locations to learn from a teacher in another location. Video-conferencing requires a lot of expensive equipment plus many support personnel to make a class happen. In addition, this technology still does not solve the problem of requiring students to come together in a common location unless the conference limits two-way interaction.

With internetworked personal computers, classes can become unbound from location. For years, chat software that has enabled distance education for a rather technically sophisticated user base has existed. Deriving from the late '70s and early '80s, chat software is plagued by unfriendly user interfaces and has proven difficult to reach for a public that is used to Internet access through a Web browser. A Java applet embedded in a Web browser makes access to this sort of education as easy as pointing and clicking with a rich variety of multimedia presentation possibilities.

A sophisticated version of such an application would require a pc camera mounted on each desktop, though it is not truly necessary to provide rich interaction. Either way, the application would allow an instructor located in one location to teach students located in any number of places. During the course of instruction, the class can make use of resources on the Internet, such as online libraries, classroom documentation, and educational Java applets to further the educational process.

All Work and No Play…

Java provides the potential to open the Internet to a multitude of interactive entertainment. Among the best known multi-user games today is Doom. Doom developers, however, face the same application development problems traditional client/server software faces, not the least of which is portability. In fact, a vast array of multi-user games exist on the Internet today that are limited by their ability to merge the rapid development of the game with a vivid user interface useable on all platforms.

Creating and Using Resource Libraries

Applications need a variety of resources to be whole. In addition to the application itself, most applications need one or more of the following:

The traditional method of distributing applications and providing access to such resources has generally been to put them on CD-ROMs or floppies and dump them on user hard drives. Wise use of the Internet, however, can enable a developer to create an application that uses nonessential resources without sticking them on the user's hard drive or requiring the user to flip through a CD-ROM library.


Every application needs proper documentation. Proper documentation, however, can often use up a great deal of disk space. Without the proper documentation authoring tools, creating and maintaining the documentation for multiple platforms also can be a pain. If the developer uses Java, an application is already portable across multiple architectures, exhibiting the same behavior on each platform. Just by writing Java applications, developers no longer have the need to maintain separate documentation for separate operating systems.

Internet-aware applications no longer need to be shipped and installed on the computer on which the application is running. Instead, documentation can be maintained in HTML format and downloaded through a Web browser on an as-needed basis by the application. Besides saving disk space, this process enables users to always have the most current documentation available to them.


Many common pc applications make use of common data. Applications such as movie guides, wine lists, CD catalogs, and so on all ship CD-ROMs in addition to the application in order to be useful. Unfortunately, this information is soon outdated and becomes difficult for users to manage. This information can instead be maintained in a single database located on the Internet that can be accessed by the application in question as well as other applications.

Templates, Styles, and Clip Art

Some applications are enhanced by or require the use of templates, styles, or clip art. Anyone with a graphics application knows that the percentage of clip art actually used is insignificant to the amount of clip art shipped with the application. This excess baggage is generally stored on CD-ROM, requiring the user to flip through his or her CD-ROM library to find the right piece of clip art.

Instead of requiring the user to manage a library of CD-ROM clip art, an application can point the user to an Internet library or libraries of clip art from which he or she can select only the pieces needed in an application. In addition to providing the user access to a convenient, dynamically growing library of art, this method of maintaining clip-art libraries can provide clip artists with a new revenue stream for their works.

The same principles that apply to clip art also apply to templates and styles. Netscape's new Gold Web browser makes use of the Internet in this manner for access to Web page authoring templates. The browser connects to a page on the Netscape Web server when the user wants to author a new Web page. At this templates page, the user designs the basic layout of the new Web page.

Add-On and Helper Applications

A helper application is one that is not central to the task at hand yet helps an application performing that task to do its work. The most well-known helper application is the spell checker. Chances are, an individual user has more than one spell checker installed on his or her machine. Having more than one is not terrifically efficient.

Java actually provides many mechanisms through which a developer can make use of helper applications. The simplest form of using any sort of helper application comes from directly loading that application over the network when needed. Even when the developer is writing an application instead of a simple applet, he or she can reference and load helper applications from a remote site for performing minor tasks. As with all object-oriented programming, the goal is reuse. If someone else has a helper application that does what is needed, use it.

A helper application, however, may come in a much less coherent form than as a full-fledged application. Perhaps it is simply a JDBC driver. As long as the user is running an application and not an applet, referencing those classes from a third site where the latest version is always sure to exist prevents application maintainers from needing to worry about the maintenance of those classes.

Distributing and Maintaining Software

Anyone with experience in software distribution and maintenance knows how difficult it can be to help users with questions when dozens of different versions of a product exist all over the Net. Is a bug that a user is reporting, for example, from a version in which that bug was supposedly fixed? Or is the bug in fact fixed in a later version and thus this is a report that can be ignored?

Applications developed for the Internet should never suffer from this problem. Applets, of course, are always shipped as the latest version. Applications, on the other hand, can at the very least prompt the user and let him or her know when a new version is available. An Internet-aware application can even go so far as to upgrade automatically for the user when a new version exists.

Automatically upgrading for the user certainly has pitfalls. If the user is unaware of this feature of an application, he or she may be offended by it the first time it is encountered. In addition, radical changes can throw users used to the way it worked in the old version for a loop. Applications making interface changes in an upgrade, therefore, should let the user know exactly what is happening and point to documentation detailing the changes between versions.

Creating Alternative Revenue Schemes

Java applications and applets have the power to change the way software developers charge for the use of software. Traditionally, users are sold a license to use a given piece of software on a single CPU. For users, this revenue scheme can be expensive because it means they pay the same amount even if they use the application once and decide they hate it as they do if they use it all the time.

A common online practice has been to distribute code as shareware. The user gets to try the application, which is often partially crippled, and then decides if he or she wants to pay for it. Unfortunately, crippled shareware is annoying to users, and uncrippled shareware developers often end up uncompensated for a lot of the use of their software that occurs.

Applications on the Internet, especially applets, are well suited to provide both users and software developers with revenue schemes that fit the products in question and the users' use of those products. Clip-art vendors, for example, can micro-charge for the use of individual pieces of clip art. If you absolutely hate most of a vendor's clip-art work but must have a particular piece, you do not need to cough up the money for the whole collection. You can simply pay five cents for a copy of the one piece you need.

In addition to micro-charging for application resources, charging for applications and applets on a per-use basis is possible. The first time a user downloads a copy of an application, he or she can set up a charge account. Each time that application is actually used, the user incurs a small charge for its use.

Finally, no better revenue generator exists than advertising. A Java application can actually advertise in its application space while running. Each advertisement would be loaded over the Net, based on which advertiser is currently paying for the space. This scheme enables an application developer to give the application away to end users for free while still making money off the application. The advertiser in turn is paying for exactly the number of people who see the advertisement, which may be custom-directed at individual users.


The Internet provides a wealth of means for revolutionizing the way in which applications are developed, distributed, used, and maintained. Unfortunately, not much advancement has been made in the direction of actualizing these possibilities. Java provides an important tool, however, for enabling developers to start walking down that road.

Unlike other kinds of applications, Java applications and applets are well-suited toward the modularization and distribution needed to be able to use resources on the Internet and reference other applications or application pieces to perform common tasks. The key for developers is to move away from the internally generated need to develop everything themselves toward the reuse of known, proven components generated elsewhere to make better products.