Distilled wisdom of generations of software developers.This capture decades of academic research and industry experience.
- Single Responsibility Principle.
- Open Closed Principle.
- Liskov Substitution Principle.
- Interface Segregation Principle.
- Dependency Inversion Principle.
- Each class should have only one reason to change.
- Decouple unrelated functionalities and segregate them into standalone classes.
- Readability, Reusability and Maintainability.
- The most important principle in OOD.
- Introduce abstractions in front of the code that will change.
- Use only when the requirements are reasonably predictable.
- Isolate your code from requirements changes.
- Importance of proper subtyping in inheritance hierarchies.
- Follow the Seven rules.
- Especially important for code that will be consumed by others like Frameworks & Libaries.
- Subtypes can be safely used instead of their supertypes.
- Clients should only depend on functionaliity they actually use.
- Principle of least knowledge and minimal coupling.
- Robust design, Protection from design mistakes, better readability.
- Governs usage of abstraction.
- Abstractions invert source code dependencies.
- Protection from changes, reusability, breaking dependency on external modules.