The Principles of OOD- 로버트 마틴


The first five principles are principles of class design. They are :

SRP The Single Responsiblity Principle “A class should have one, and only, one reason to change.“
OCP The Open Closed Principle You shloud be able to extend a classes behavior, without modifying it.
LSP The Liskov Substitution Principle Derived classes must be substitutable for their base classes.
ISP The Interface Segeregation Principle Make fine grained interfaces that are client specific.
DIP The Dependency Inversion Principle Depend on abstraction, not on concretions.

추가 설명


The next six principles are about packages.

The first three package principles are about package cohesion, they tell us what to put inside packages:

REP The Release Reuse Equivalency Principle The granule of reuse is the granule of release.
CCP The Common Closure Principle classes that change together are packaged together.
CRP The Common Reuse Principle classes that are used together are packaged toghether.

추가 설명