By bloid
via indiangeek.net
Published: Aug 26 2008 / 13:11
A few years back when I first started reading about design patterns, refactoring, OO principles etc. I got it into my head that I should “Always program to an interface not an implementation”. So whenever I needed to create a new class/abstraction I used to start of with an interface IThis, IThat etc. over a period of time I saw that most of my interfaces were only ever implemented by one class. This started becoming a pain to maintain as adding a new method meant that the method needed to be added to both the interface and the implementation class, further since there was only one implementation of the interface some developers started substituting one for the other and freely casting between the interface and the implementation.
Add your comment
Voters For This Link (19)
-
bloid -
mswatcher -
clavalle -
ugur.myopenid.com -
subru77 -
carolynhigbee -
johnemond -
thinkingserious -
Motion Control -
brian_cunningham -
Moominpapa -
j2eecop -
cedricho -
Shaun_Robinson -
mheath -
wyldwolf -
jimmyrenaud -
mdesjardins -
uri1803


