-
原则
- SRP(Single Responsibility Principle)
- OCP(Open Closed Principle)
- LSP(Liskov Substitute Principle)
- DIP(Dependency Inversion Principle)
- ISP(Interface Segregation Principle)
-
模式
-
原则
- Program to an interface, not an implementation
- Favor object composition over class inheritance
-
创建型
- Abstract Factory
- Factory Method
- Singleton
- Builder
- Prototype
-
结构型
- Adapter
- Bridge
- Composite
- Decorator
- Facade
- Flyweight
- Proxy
-
行为型
- Chain of Responsibility
- Command
- Interpreter
- Iterator
- Mediator
- Memento
- Observer
- State
- Strategy
- Template Method
- Visitor
-
最佳实践
- 构造函数中赋值的成员,而不是虚函数
- 方法
-
流程
- 领域词汇
- Use Case