Code Daquan Learning Note (ii): 4–5 Chapter

Source: Internet
Author: User

1. Key Building practices

2. Design in software construction is a process of determining trade-offs and adjustment sequences, with tradeoff everywhere.

3. The primary technical mission of the software is the complexity of management

Decomposition of the entire system into subsystems, subsystem high cohesion, low coupling, minimizing the complexity of a particular time period, thus reducing the mental burden

4. Specific features of high-quality design:

(1) Minimum complexity: simple, easy to understand

(2) Easy maintenance: Programming Specification: Naming, annotations, etc.

(3) Loose coupling

High Cohesion : class interface reasonable abstraction, encapsulation, information hiding

Low coupling : reduces the association between components

(4) Scalability

(5) reusability (multiplexing)

(6) Portability

(7) Level:

5. The fundamental purpose of inheritance is to achieve polymorphism, if not, be sure to use the combination

6. Information hiding: encapsulation, modularization, design interface

(1) Reduce duplication of code, reduce the amount of code affected by the changes

(2) use global variables with caution

(3) Disable the Boolean variable as a state variable (only two states, not easy to expand), you should use the enumeration

(4) access to member variables must be through the get and set functions

(5) Check the status variables must pass IsEmpty such as sub-programs , do not directly check

7. Use a common design pattern

Code Daquan Learning Note (ii): 4–5 Chapter

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.