- Single Responsibility Principle(单一功能)
- A class should have only one reason to change.
- Open Close Principle(开闭原则)
- Software entities like classes, modules and functions should be open for extension but closed for modifications.
- Liskov's Substitution Principle(里氏替换)
- Derived types must be completely substitutable for their base types.
- Interface Segregation Principle(接口隔离)
- Clients should not be forced to depend upon interfaces that they don't use.
- Dependency Inversion Principle(依赖反转)
- High-level modules should not depend on low-level modules. Both should depend on abstractions.
- Abstractions should not depend on details. Details should depend on abstractions.
http://www.oodesign.com/design-principles.html