1. Object-Oriented design principles
- Single Duty principle: one class is responsible for the corresponding responsibilities in one functional area
- Open and Close principle: Software entities should be opened for expansion and closed for modification;
- The Richter substitution principle: All references to base class objects can transparently use objects of their subclasses;
- Dependency reversal principle: abstraction should not depend on detail, detail should depend on abstraction;
- Interface Isolation principle: use multiple specialized interfaces without using a single total interface;
- The principle of synthetic reuse: Try to use object combination rather than inheritance to achieve the purpose of reuse;
- Dimitri Law: A software entity should interact with other entities as little as possible;
2. The software model's infrastructure consists of four parts:
- Description of the problem (what is the problem to be solved)
- Prerequisites (used under what conditions or constraints)
- Solution (how to solve)
- Effect (what are the pros and cons)
3. According to the use, the design pattern is divided into:
- 5 Types of Creation (describes how to create objects)
- Structural type (describes how to implement a class or object combination) 7 kinds
- Behavioral type (describe how classes or objects interact and assign responsibilities) 11
3.1 Create-mode:
- Simple Factory mode
- Factory method Mode
- Abstract Factory mode
- Single-Case mode
- Prototype mode
- Builder mode
3.2 Structural mode:
- Adapter mode
- Bridging mode
- Combination mode
- Decoration mode
- Appearance mode
- Enjoy meta mode
- Proxy mode
3.3 Behavioral Mode:
- Responsibility chain Model
- Command mode
- Interpreter mode
- Iterator mode
- Broker mode
- Memo Mode
- Observer pattern
- State mode
- Policy mode
- Template method Mode
- Visitor mode
Resources:
- Design mode (Java edition)
Java design Pattern (general)