Replace Inheritance with Delegation

From CSSEMediaWiki
Revision as of 05:23, 21 September 2008 by Jason Clutterbuck (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Straight from Martin Fowler 2003:

"A subclass uses only part of a superclasses interface or does not want to inherit data.

Create a field for the superclass, adjust methods to delegate to the super class, and remove the subclassing."

See Also

Don't burn your base class

Personal tools