Is your object oriented design SOLID?

I believe object oriented design is the most widely used technique to develop applications in most of the industries today. It is a great concept of modeling real world objects into software paradigm. But not all object oriented designs are good designs. Just because your design uses the important concepts of object orientation does not make it a robust, scalable and extensible design. Experts in this field have, over the years studied various aspects of object oriented design and have come up with some guidelines or principles to create a good design. For us mortals, following these principles could, probably not guarantee, but certainly increase the probability of developing high quality software.

Following are the principles which form an acronym of SOLID as laid out by Robert C Martin.

Single responsibility principle – Each class (or a method) must have one and only one reason to change.

Open closed principle – A class (or a method) must be open for extension but closed for change.

Liskov substitution principle – Derived classes must be substitutable with their base class.

Interface segregation principle – Make more granular interfaces which are client specific.

Dependency inversion principle – Depend upon abstractions, not on concrete classes.

Scott Hanselman has posted a great great podcast with the Uncle Bob ( Robert C Martin) where he talks about each and every principle listed above in a very lucid manner. Here is the link to that podcast http://www.hanselman.com/blog/HanselminutesPodcast145SOLIDPrinciplesWithUncleBobRobertCMartin.aspx.