Steps and methods for writing flexible, extensible programs (College School)

Source: Internet
Author: User

First, the need to meet the needs of customers to build applications, to confirm that your software is doing the right thing, where "use case" is a major tool, this stage is called "Requirements analysis" in software engineering.
    • ① first, we need to communicate with users to form demand.
    • ② writing use cases, forming usage scenarios, using scenarios, refers to a path from the beginning to the end of a use case, and a use case may correspond to multiple usage scenarios.
    • The ③ detects whether the use case covers all requirements and analyzes the hidden needs of the users in the real scenario.
    • ④ complements the hidden requirements and use cases based on the analysis in ③.
    • ⑤ analyzes use cases, finds nouns (classes) in use cases, and verbs (methods) to draw class diagrams.
at this point, through this step, basically can determine what the user needs, what the application needs to do, according to this code, you can basically draw the user needs of the application. Second, use the basic OO principles to redesign the architecture of the software.in the software life cycle, "change" is always the theme, when the change comes, if the software is not flexible to respond to changes, then change the cost and maintenance costs will be very scary. will also put developers in a deep quagmire.
    • ① find the classes that change in the system and find the parts of the class that are changing.
    • ② A class can only have one responsibility, change the class of factors can only have one, if there is a lot of changes in a class, then these changes should be extracted, encapsulated.
    • ③ find out where the system is oriented to implement programming, break these programs, extract common interfaces, and change to interface-oriented programming.
    • ④ re-examine the design of the program, reduce the coupling between the class, the module, the detection program can work properly.
using the basic OO design, can design a relatively good software, basic ability to deal with changes. Thirdly, using the mature model, once again examines the software architecture.The design pattern is the mature experience accumulates, uses the mature pattern, can make the software structure clear, is easy to understand.
    • ① finds some scenarios that conform to the classic pattern and assembles the local schema into a schema that satisfies the schema.
    • ② re-examine the design of the program, reduce coupling, improve reuse, detect whether the program can work properly.
a good pattern, like a framework, can improve the readability of code and architecture, and the more a person feels that the better the software system, the more it looks like a framework, the changed parts have been decoupled into several classes, and each time the requirements change, just change those classes.  above, is the learning of some of their own experience.

Steps and methods for writing flexible, extensible programs (College School)

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.