Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
DEPENDENCY INVERSION is one of the most effective ways of ensuring that your class hierarchies are open for extension but closed for modification. There are three basic guidelines for implementing dependency inversion. (They’re sometimes described as “rules”, but no design principles are, or should be, unbreakable, and these perhaps more than most!)
1 BEWARE OF CLASS MEMBERS DEFINED AGAINST A CONCRETE CLASS
Whether you’re considering properties or variables, be sensible about this one—it’s impossible to implement completely. Somewhere or other, you have to create a String or Int16 (which are concrete classes, after all) or you’ll never be able to do anything! But implementing a concrete class makes you vulnerable to changes made to it, and that leads to fragile code, so... beware.