2006/06/17 02:34 Developer
OOP 디자인 설계
OOP 디자인 설계
http://architechie.blogspot.com/2005/10/oo-design-principles-quick-rundown.html
http://architechie.blogspot.com/2005/10/oo-design-principles-quick-rundown.html
The Single Responsibility Principle (SRP)
There should never be more than a single reason to change a class... Changes to one responsibility may impact other responsibilities.
Open Closed Principle (OCP)
A module should be open for extension but closed for modificationShould be able to add behavior without modifying common behavior
Liskov Substitution Principle (LSV)
Subclasses should be substitutable for their base classes
The Dependency Inversion Principle
Modules should depend on abstractions, not concrete modules... Details [controllers?] should depend on abstractions, not the other way around.
"Inversion" in contrast to structured, procedural thinking.
The Interface Segregation Principle (ISP)
Interfaces shouldn't have stuff that their clients don't need... Factor interfaces so that clients can use just relevant members
The Law of Demeter
Only talk to your friends who share your concerns... Never call a method on an object that you got from another call or on a global object.
TAG OOP