January 8, 2014

The SOLID principles of Object Orientated design

The 5 basic principles of OO design were put together in the early 2000s by Michael Feathers and Robert C Martin. They are intended to allow the developer to create software that is easy to maintain and extend over time. The patterns which have come out of these principles are usually easy to test and lower the total cost of ownership over the lifetime of the project.

They are also used in interview questions a lot and as such I have included them in their own section.

The principles are:

S – Single Responsibility Principle
An object should have a single responsibility.

O – Open / Closed principle
An object should be open for extension but closed for modification.

L – Liskov substitution principle
Objects in an application should be replaceable with instances of their subtypes without altering the correctness of that program.

I – Interface segregation principle
Many client specific interfaces are better than one general purpose interface.

D – Dependency inversion principle
One should depend upon abstractions and not concrete instances.

Simon Powers is the CEO and founder of Adventures with Agile. He has over 20 years’ experience helping very large organisations to thrive in the market and to be better places to work. His approach led him to create our transformative ICAgile Certified Enterprise Agile Coaching training courses, which run worldwide and online. Simon is one of the first ICE-EC experts in the world.