4.4 Implementation of the Application Logic
The JSP pages are the front end of the application, while the database stores the system data.
The application logic, programmed in Java, pulls the two pieces together. The following figure
shows all classes and the dependencies among them for the internal part of the application.
Figure 15 indicates that many classes are servlet classes (i.e. they are derived from the
HTTPServlet class). The servlet classes contain only service() methods to process client
requests. The request is almost always received from a JSP page.
To the left of the servlet classes, the classes containing the application logic are shown. Their
methods perform actions such as database queries, updates, and inserts according to provided
arguments. Various get() methods are also provided, which are used by the JSP pages to
access the dynamic data that the private member variables of the classes contain once a
database query to retrieve the information was performed. The dependencies of the servlets to
the application logic classes are shown in the diagram above through solid lines.
To the right of the servlet classes, miscellaneous supplementary classes are shown. Some of
them are required by most of the servlets (e.g. the database bean class MyDbBean), while
others are needed less frequently.
63
Java Web Hosting Application Development Using Java Technologies Hosting
|
|
|
|
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved. |