Java Reference
In-Depth Information
Program Development
The program development cycle and corresponding tasks for this project are
shown in Table 12-1.
Table 12-1 WebStocks Web Application Development Tasks
DEVELOPMENT PHASE
TASK(S)
1
Analyze the requirements
Analyze the Web-based stock-tracking application problem. Determine any
new functionality added to the original application.
2
Design the solution
Design the logic to solve the problem. Determine which parts of the
application will use scripting tools (HTML, JSP) versus what will be done in
the servlet.
3
Validate the design
Confirm with the user that the design solves the problem in a satisfactory
manner.
4
Implement the design
Translate the design into code. Include internal documentation (comments
and remarks) within the code that explains the purpose of the code
statements. Design and code the servlet and corresponding HTML
documents and JavaServer Pages that interact with the servlet.
5
Test the solution
Test the application by publishing the servlet, HTML documents, and
JavaServer Pages to the Web server and then testing the Web application
by accessing both user and stock data. Find and correct any errors
(debugging) until they are error free.
6
Document the solution
Print copies of all source code, including the HTML documents and
JavaServer Pages.
Analysis and Design
Figure 12-2 shows the requirements document that initiates the development
cycle for the WebStocks Web application. The requirements document illustrates
that application development can require skills in a variety of areas, such as Java,
HTML, JavaServer Pages, and databases. This implies that an application can be
built by a single developer, well-versed in complementary development tools, or
by a team of developers, each having a particular specialty.
PROBLEM ANALYSIS The problem of Web-enabling an application is not
focused on the core functionality of the application, as this was determined
during the development cycle of the original application. Rather, adapting an
application for use via the Web involves analyzing how the application is imple-
mented on the Web; specifically, what technologies are available for use and
how much existing code can be reused. Also, a programmer must consider if
functionality beyond the original application must be added.
In this Web application, a number of classes developed earlier are usable
without modification, including the User, Password, and StockTrackerDB classes.
The original StockTracker class, however, was created for a local application and,
while it incorporated the controller logic from the MVC pattern, it also handled
much of the user interface (the view logic). Using the StockTracker class to build
all of the user interfaces in a Web format, while possible, would increase the size
 
Search WWH ::




Custom Search