OOD 五大原則
- SRP
- OCP
- LSP
- DIP
- ISP
OOD 五大原則 (5 principles)
SRP
Name: The Single Responsibility Principle
Desc: A class should have one, and only one, reason to change.
OCP
Name: The Open Closed Principle
Desc: You should be able to extend a classes behavior, without modifying it.
LSP
Name: The Liskov Substitution Principle
Desc: Derived classes must be substitutable for their base classes.
DIP
Name: The Dependency Inversion Principle
Desc: Depend on abstractions, not on concretions.
ISP
Name: The Interface Segregation Principle
Desc: Make fine grained interfaces that are client specific.