This post contains some Design Pattern questions. Updating…
在此收录一些常见的设计模式问题。更新中…
Design Pattern Principles
- Single Responsibility Principle
- Open/Closed Principle
- Liskov Substitution Principle
- Interface Segregation Principle
- Dependency Inversion Principle
Design Patterns
Singleton 单例模式
- Each class has one single instance.
Simple Factory Pattern 简单工厂模式
- Split creating instance and using instance to achieve decoupling.
- Violated The Open Closed Principle.
Adapter Pattern 适配器模式
- Simple as its name.