APPLICATION DESIGN


Comparing agents, servlets, and CGI programs
Agents, servlets, and CGI programs all allow you to extend the functionality of your IBM® Lotus® Domino(TM) Web application. Agents can be tightly integrated with a Web application through the form WebQueryOpen and WebQuerySave events. Servlets have special features available through the Servlet API classes, such as session and cookie management. Due to the growing popularity of Java, the trend today is to use servlets rather than CGI programs for new development. However, there is a large selection of off-the-shelf CGI programs already available.

If you are writing your own application and need to program some functionality on the server, you may have a choice of which type of program to use. Each type of program has its advantages and will be the best choice in particular situations. Here are some suggested uses for each type of program:
Program typeBest uses
AgentPrograms that perform Domino actions when documents are read or posted.

Programs that need to be run on a schedule or when database actions occur, such as the arrival of new mail.

ServletPrograms that use standard Java interfaces such as JDBC.

Programs that use HTTP session maintenance or cookies.

Complex or resource-intensive Java programs.

CGI programPrograms that need low-level access to system resources.

Programs that interface with another product through a non-Java API.

Here are some useful comparisons of the properties of these programs.

What language can the program be written in?


Where is the program stored?
How is the program invoked by a Web user?
When is the program loaded and unloaded by the server?
How can the program interact with Domino?
What security is available for the program?
See Also