Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Alternative deployment methods, Part 2: The best of both worlds

Add a new trick to your Java application-deployment toolbox

  • Print
  • Feedback
In my previous column, I examined the most widely used method of deploying Java client-side applications in enterprise environments -- the applet -- and presented several reasons for its popularity: the ubiquity of browsers, ease of distribution and maintenance, and so on. I also described its limitations, which include lengthy download times, the browser's document-centric presentation model, and nonuniform support across browsers.

Despite these shortcomings, applets should not be abandoned completely. They are clearly useful in some situations - for example, as realtime information on an otherwise static Webpage. Problems arise, though, when developers use applets inappropriately. Unfortunately, too many training classes and books still put a disproportionate amount of emphasis on applets, and many newcomers look solely to applets when deploying Java applications in a Web-based enterprise environment.

Alternative deployment methods: Read the whole series!

In Part 2 of this series on deployment methods, I present an alternative technique that uses applets in an unconventional manner. This method melds some of applets' best features with those of traditional deployment techniques and creates a foundation upon which powerful deployment tools can be built.

The time is ripe to adopt a new deployment model. In recent months, I've talked with developers who have independently created similar techniques. Vendors are also stepping up to the plate -- during JavaOne, a handful of companies announced products that fit the model I describe in this article. See Commercial deployment products for a discussion of off-the-shelf products.

Applets play a new role

The greatest boon to the applet deployment method is the ubiquity of the browser -- since browsers are everywhere, applets can run everywhere. Unfortunately, applets suffer from deficiencies in their original design (a simplistic lifecycle and the need for network connectivity), the browser's document-centric presentation model, and implementation differences between browsers (although Sun's Java Plug-In has helped quite a bit).

The method I describe here uses an applet as the delivery vehicle, thereby employing the browser's ubiquity, but avoids implementing an applet as the execution platform, thus skirting the problems described above.

Figure 1 illustrates the general design:

Figure 1. The relationship between repository, Web server, and browser

The system consists of three core components (the repository, Web server, and browser) and one optional component (the deployment server). The repository holds deployable resources, the deployment-instructions file, and a small boot-strap applet. The Web server delivers resources from the repository, in addition to typical Web fare like Webpages and images. The browser provides the user interface and the initial installation platform. I'll explain the function of the optional deployment server below.

  • Print
  • Feedback

Resources