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