ContentsApplication DesignWhat goes where - operational delegation
Previous: Who does what - logical delegation | Next: Interfaces

What goes where - operational delegation

Most texts provide very little discussion about the operational considerations that developers should make. Some of this is understandable, since infrastructures and policies vary widely. Because of the omission of these considerations from most programming texts, most novice programmers completely ignore the issue.

Decisions need to be made about where commercial-grade applications run. With fat-client applications, the only thing that needed to be known was how to connect to the data server. Because no active parts of the application ran anyplace except on the client PC, any operational decisions that are commonly understood involve how to install it in Microsoft Windows.

Web applications involve components on any number of different platforms. Nothing needs to be installed on the PC, so long as the end user has access to a web browser. All releases and maintenance is done on the server(s) that run the application.

One of the most important attributes of Java Servlets is the fact that they can easily, quickly, and (with some environments) automatically be moved from one server to another without the user seeing or sensing any difference. Because Java Servlets are wonderfully portable in their binary state, the developer need not be concerned about which server is going to host his application; but he does need to understand that his application is not going to run on a PC.

What I mean by this is that the developer should get in the habit of thinking of his servlets running "out there" on a server somewhere. It isn't enough just to get them running on his PC and then providing the system administrator with a JAR or (worse) a directory full of class files.

For this reason, the development environment that I recommend is one where the (Linux/UNIX/NT) system administrator has set up the servlet environment and has provided a directory for the servlets to be copied to using SMB/CIFS, NFS or (as a last resort) FTP. The developer uses his favorite Java development tools on a development machine (probably a desktop PC) to write and compile the source, then either manually making a copy of the binary class files into the server-side directory - or setting up his Java compiler to automatically output them to a mapped drive.

In the long run, using a development environment like this encourages the developer to think about the deployment, portability, and performance issues involving his application. This small inconvenience saves much grief during the lifetime of the application. If the servlet uses JDBC or CORBA/RMI to communicate with other services, it is helpful for these to reside on other servers as well.

Putting the entire development and test environment on a single PC is asking for trouble. If you want to do servlet development at home: buy a LAN startup kit (most can be had for under $90) and get another cheap old PC to be your server and install Linux on it - you'll be amazed at how useful it will be. If you have a single dial-up Internet account, your cheap old Linux box can serve as a gateway to the Internet for all of your home PCs (this may help sell the idea to your spouse :-)


ContentsApplication DesignWhat goes where - operational delegation
Previous: Who does what - logical delegation | Next: Interfaces