In this chapter, we will provide some considerations for adding deployment services to pre-
existing Java code. Moreover, rather than discussing the various possibilities abstractly from a
theoretical point of view, we will see a simple yet complete example of full rethinking of a pre-
existing software. This example will also be useful to illustrate some of the general techniques
described in Chapter 4, “Designing for Deployment.”
Adding deployment services to pre-existing Java programs is a more complex issue than one
may think at first. Despite the fact that legacy Java code is often no more than few years old,
the sheer availability of communication mechanisms (all major high-level protocols, RMI,
sockets, CORBA, and so on) often is too confusing for the average developer facing the need
of tailored deployment. Likewise, the choice of a standard deployment solution could be quite
complex. Developers have to decide which means among many (applets, JNLP, third-party
solutions, and so on) is best suited for their current situation.
Unfortunately, following a bad habit in software development, deployment is often neglected
and practically ignored until the development phase has finished. As we already discussed, this
could be a costly way to proceed, but it is still very common. It is not enough to provide a
great number of deployment means (as Java does, together with the Internet) for developers
and managers to change their old habits.
In this chapter, we will cover both the issue of adding deployment services to our software
(what we described as establishing a deployment circuit) and solving the merest deployment
issue: Just let users have the software installed on their computers. The previous approach can
be seen as a radical use of deployment services in our software; the latter is a more shallow
one, in which we are interested in the first installation only.
Generally speaking, many of the considerations discussed in Chapter 4 still apply here. The
reader is encouraged to refer to Chapter 4 to integrate this section's content.
We will focus on the J2SE 1.x versions because they provide the widest freedom of choice.
J2ME and J2EE were discussed in the previous chapter.
The major deployment solutions that developers can use when solving the deployment riddle
for their Java software are those already discussed in the first part and in Chapter 4 (and sum-
• JNLP .For developers, JNLP is a complete bonus. It is free, it saves programmers a lot
of effort, and it is rather simple to use. Despite some technical weak points (only J2SE
code could be deployed, and only on an HTTP connection, for instance), its main draw-
back comes from the burden posed to the end-user, especially for the first time launch