|
Verify Java App Development on Linux
Implement error prevention throughout the development cycle to ensure that each part of a Web service's application logic is reliable and secure
by Dr. Adam Kolawa and Jeehong Min
August 18, 2004
By preventing errors from the earliest phases of the development process, developers can simultaneously improve software reliability and reduce development time. One of the best ways to prevent errors is to perform unit testing and check coding standards as code is being written. If developers can easily check each piece of code as soon as it's completed, team members can find and fix problems before someone else unwittingly introduces new errors by adding code that builds on or interacts with problematic code.
In addition, developers have the opportunity to recognize and learn from their mistakes before repeating them in new code. When an entire team concerns itself with errors from the earliest phases of development, the result is more robust, maintainable, and reliable code; more time for complex testing (rather than haphazard bug chasing) at the end of the development process; and fewer missed deadlines.
Let's look at some best practices for developing Java applications on Linux and see how these best practices can be applied to build and verify the Java code that provides the application logic for a sample real estate Web service. (See "3 Tips for Developing on Linux" for specific suggestions on deriving the benefits of using the Linux platform for software development.)
Application Logic
Assume we have been asked to implement a Web service that will be a service for a large realtor with office branches across the country. This realtor wants to implement a Web services initiative that supports these requirements: Potential and existing customers will submit contact information, desired living location, and desired price range of a home through the Web service. These users should receive a response from the server that gives them the location of the branch closest to them and an estimate of the monthly mortgage, which will enable them to contact a real estate agent and begin the process of finding a home. Real estate agents from different branches will submit a request for a list of potential customers who are looking for homes in the local area, which will enable the agents to earn business and establish contact with interested customers.
The first step in developing this Web service is to implement the application logic. We can do this by dividing the application logic into modules that provide needed functionality. We begin by writing the code that makes up the application logic. From a high level, the logic can be divided into several modules that allow for parallel development of individual units, which can later be integrated. In our example, we can divide the code into these two modules:
-
Module 1: From the customer request, process contact information, desired living location, price range, and then return the location of the closest branch and mortgage information. Submodule A – submit contact information into the database; submodule B – calculate mortgage information from the price range; and submodule C – retrieve closest branch(es) from the contact information and desired living location.
-
Module 2: From the agent, process agent information, and then return a list of potential customers in the area. Submodule A – verify agent information, and submodule B – based on agent location, query the database for potential customers around that area.
Back to top
|