Inheritance and Interface Design are two complete different strategies and they should be used with two complete different intentions.
When you inherit from a class you always got a hard coupling between to types.
Interfaces are just meant to give oyu a possibility to detach types. This reduces the complexity of your software and also increases the Testability of the whole application.
Using Interfaces as an replacement of MultiInheritance is a fault and should be avoided.
The Use of Interface is not just about reusing components. Its about creating autarchic Modules / Components which can work and be tested , be developed stand a alone without knowing any thing more than the contract they have.
So you can give a whole new person the task to develop a component for your 10 year old Software without to work him into the complete application.
Just give him the Contract and let him work
ARCast.TV - Juval Lowy on Interface Based Design
Sep 11, 2008 at 11:32 PMInheritance and Interface Design are two complete different strategies and they should be used with two complete different intentions.
When you inherit from a class you always got a hard coupling between to types.
Interfaces are just meant to give oyu a possibility to detach types. This reduces the complexity of your software and also increases the Testability of the whole application.
Using Interfaces as an replacement of MultiInheritance is a fault and should be avoided.
The Use of Interface is not just about reusing components. Its about creating autarchic Modules / Components which can work and be tested , be developed stand a alone without knowing any thing more than the contract they have.
So you can give a whole new person the task to develop a component for your 10 year old Software without to work him into the complete application.
Just give him the Contract and let him work