This is the third of a series of actual combat nightly builds, using the open source technology described in the second article to design and implement the analysis model in the first article.
1, the construction of information display system design
This is a typical Web application system, but it's very simple. According to "object-oriented System analysis and Design" described in the design of the main four parts are described:
The refinement of the problem domain: Consider the future implementation of language features and the use of some design patterns, refinement of the analysis model, and make some trade-offs. To achieve a description of how the future system "does things".
Human-machine interface design: Consider and user interaction, the layout of information display and receive user instructions or data behavior design.
Storage Design: Consider how to save business data, mainly consider the current storage mode, but also consider the future storage mode of possible changes, that is, business objects and storage mode coupling problem.
System interface Design: mainly consider the cooperation between the system and the external system, especially do not forget the interface with the operating system or driver.
1.1 Refinement of the analysis model
We do not consider the implementation of the problem in the analysis model, now we must refine the construction of the information Display system analysis model, so that it can be achieved.
Based on a systematic introduction of the front velocity template, let's expand the class diagram of the display system. As the following "Show system Design Class Diagram" shows, because the Java language does not support multiple inheritance, and the original analysis model's Buildinfolog class has only member variables, we change this class to the Java language interface to implement, We turn Nightlybuild into a class that implements this interface, so we also have buildinfolog data members. In addition, Nightlybuild also inherited the Java.util.Hashtable class, making it appear as a Harlem table, the Hassi with the name of the project as the key to the project's list of construction labels as a value. According to the spirit of the MVC pattern, the Nightlybuild class is a business object class that should be freed from the formatting of the information display, so the original List_ buildinfo_table method of the Nightlybuild class is placed in the Buildinfo_ LIST.VM in the template file. At the same time we added a Nightlybuildservlet class to respond to the access requirements of the building information care provider, which is a subclass of the Velocityservlet class in velocity, so nightlybuildservlet is the control role in the MVC pattern.
As you can see in the "Show System MVC View" below, the business object Nightlybuild object is saved in the model context by Nightlybuild name, when control nightlybuildservlet template file Buildinfo_ LIST.VM to meet the requirements of building information-seekers to browse the building information directory, the BUILDINFO_LIST.VM file formats the information of the Nightlybuild object stored in the context and forms a view for browsing by the viewer.