It was nearly 10 years ago I picked up a book called Agile Principles, Patterns and Practises in C# by Robert C. Martin which revolutionised the way I thought about Object Orientated Programming. In this book he discussed SOLID Principles.
In this blog series I will discuss each principle with code examples. This will prevent you from writing code that is less rigid, to change, more maintainable and easier to understand. You may be wondering why I wrote this series if it’s all in a book. Basically it is so I understand it. I have this approach that says “if you want to understand something, learn it and then try and teach it to someone else”.
When it comes to programming methodologies you will always meet purists and sceptical people. Everyone has their opinion as to the write way and the wrong way. Like anything in life, if it works for you, use it.
The source code for this blog series can be found here.
- (S) Single responsibility principle.
- (O) Open closed principle.
- (L) Liskov substitution principle.
- (I) Interface segregation principle.
- (D) Dependency Inversion principle.
Each blog coming up will cover one principle.