1. Collect and analyze Application Requirements
A. I used a UML case in this example. I feel that the design idea is very clear, but I don't know if I can analyze it myself if I put it in front of me. In short, I think that with the use case document, the code after writing is as simple as building blocks.
B. The main content of the case document is: ① preconditions; ② main event stream; ③ other event streams; ④ post conditions
2. design the database. This activity should be important. I think it should be one of the factors that determine the program performance!
3. Design the customer interface and hand it over to the artist.
4. Design actionform
5. Design Action
6. design application business logic components
By studying this example, the struts development process is basically eye-catching. We also learned how to allocate views, controllers, and model components.
1. in view components, try to avoid the appearance of Java business logic Code. These codes can be completely encapsulated in tags. Although the workload is much larger than writing directly on the page, but in exchange for JSP view components that can be reused and easy to debug.
2. for actions, some business logic verification and process control can be basically completed. I don't know much about it here. I will not talk much about it, but I feel that I am in the position between understanding and confusion.
3. The model component is responsible for the actual business logic, such as database access operations (query, delete, and modify ). It is worth noting that the model component should be independent from the Controller component, that is, the model component should not access the servlet API or the struts API class. All operations on attributes (data and variables.
Today's views on Struts:
Recent projects have been developing based on Struts. Struts process control is really a good thing. It does solve many problems for developers like ours, as an old saying goes, "let developers focus more on business logic development ".
Process control is good, but the view layer is too depressing. Form and tags, alas, really make me love and hate. In particular, tags seems to be too rigid to write, so now I want to learn about jstl.