Learning struts (2)-Struts Requirement Analysis and Design (addressbook example)

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.