Web Enabling Your HP 3000
Application
Logic
(COBOL)
Light-weight
CGI Program
Apache
Web
Server
Database
Web
Browser
Intranet/
Internet
Input data
HTML doc
Display
HTML forms
instead of
VPLUS screens
5
Let’s take a look at a “traditional” HP e3000 application. A traditional HP e3000 application is
usually a host/terminal-based COBOL application, using VPLUS to handle the communication
with the user and Image/SQL intrinsic to read/write data from and to the database.
Image
Calls
Application
Logic
COBOL
VPLUS
Calls
User
I/O
Database
“Traditional” VPLUS/COBOL Application
Now, let’s look at that application in a Web environment. Note that the
main application logic and communication with the database has not
changed. What has changed is the VPLUS call. Also note that for small to
medium sized applications the application logic can be in the CGI pro-
gram. The diagram below demonstrates an architecture that will be effi-
cient for medium to large sized applications.
For more information or tutorials on CGI, please visit the following sites:
http://hoohoo.ncsa.uiuc.edu/cgi/
http://www.jmarshall.com/easy/cgi/
or, search for keyword “CGI” using any one of the popular search
engines (Yahoo, Lycos etc.). In addition, there are numerous books
available on CGI programming in bookstore computer sections.
Web-enabled VPLUS/COBOL Application
Java Servlet
As we mentioned before, the most common way to create the link between the Web server and
the database is through CGI. Unfortunately, CGI has some deficiencies, such as slow perfor-
mance and the lack of ability to maintain state between the server and the browser. Faster non-
CGI technologies have developed. Many of these technologies execute on the server-side. The
server-side code connects to a database, retrieves results, and dynamically generates HTML
pages. The generated HTML pages are then sent back to the browser via the Web server. One of
these technologies is the Java Servlet, and is being rapidly adopted by Web developers.