The Liskov Substitution Principle
Derived classes must be substitutable for their base classes.
dEPENDENY iNVERSION
A. HIGH LEVEL MODULES SHOULD NOT DEPEND UPON LOW
LEVEL MODULES. BOTH SHOULD DEPEND UPON ABSTRACTIONS.
B. ABSTRACTIONS SHOULD NOT DEPEND UPON DETAILS. DETAILS
SHOULD DEPEND UPON ABSTRACTIONS.
OOPS Principle Redifiened
http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
http://www.objectmentor.com/resources/publishedArticles.html
The Interface Segregation Principle (ISP)
CLIENTS SHOULD NOT BE FORCED TO DEPEND UPON INTERFACES
THAT THEY DO NOT USE.
When clients are forced to depend upon interfaces that they don’t use, then those clients
are subject to changes to those interfaces. This results in an inadvertent coupling between
all the clients. Said another way, when a client depends upon a class that contains interfaces
that the client does not use, but that other clients do use, then that client will be
affected by the changes that those other clients force upon the class.
The Common Reuse Principle (CRP)
THE CLASSES IN A PACKAGE ARE REUSED TOGETHER. IF YOU
REUSE ONE OF THE CLASSES IN A PACKAGE, YOU REUSE THEM
ALL.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment