Struts Demand Analysis and Design

xiaoxiao2021-03-06  109

Methods for demand analysis and design for Struts applications, basically include the following steps:

1. Collect and analyze application needs

a. In this example, UML use case is used, which feels very clear such that it is very clear, but I don't know if I put it in front of me, but I go to analyze, I can do it. In short, after having a use case document, the code behind it is simply as simple as the wood.

b. The main contents of the use case document are: 1 pre-condition; 2 main event stream; 3 Other time flow; 4 post conditions

2. Designing the database, this life should be more important, I think it should be one of the factors that determine the performance performance!

3. Design the customer interface, these will be handed over to the art. Haha.

4. Design Actionform

5. Design Action

6. Design application business logic components

By studying this example, it is basically an eyebrow for the Struts development process. It is also further mastered how to set up allocation functions to the view, controller and model.

1. Try to avoid Java's business logic code in view components, which can be packaged in TAG, which feels that the workload is more important than directly written directly on the page, but in exchange for JSP that can be reused, easy to debug View components.

2. For Action, you can basically complete the verification and process control of business logic. It is not very thorough here now, I don't say much, I feel that the position between understanding and confused.

3. In the model assembly, responsible for actual business logic, such as accessing the database (check, delete, change). It is worth noting that in the model component, it should be independent and the controller components should be kept independent, which means that the class in the Servlet API or Struts API should not be accessed in the model component. It is completely actions to attribute (data, variable).

转载请注明原文地址:https://www.9cbs.com/read-103646.html

New Post(0)