Random knowledge shared...
The fifth principle of the five SOLID principles is the Dependency Inversion Principle (DIP). You might expect an article on the ISP first, but I feel the internet is filled with enough posts about SOLID. This one was already finished so I'll publish it nonetheless :)
A couple of years ago I was still at the Utrecht University of Applied Science (university in short from now on), I detested it. Sure, I liked information science and I like to dabble around, but formal education is something that was obviously not for me. It took me four different educations and a year of working in between to even finish one.
Between a holiday in the states, buying and redecorating a house and a summer it has been a long time since my last blog entry. It seems about time for a new one :) Today we'll be dealing with the third principle of SOLID, the Liskov Substitution Principle.
The Liskov Substitution Principle (LSP) was coined by Barbara Liskov as early as 1987. The principle is very tightly connected to the earlier discussed Open Closed Principle. A good way of adhering to the OCP is understanding and implementing code that uses the Liskov Substitution Principle. In this article we will discover why and how.
In the second installment of this series we will be looking at the Open Closed Principle (OCP), responsible for the O in SOLID. This principle is extremely important if you accept the premise that all software systems change during their lifetime. If you want to design systems that need to last beyond their very first versions adhering to the Open Closed Principle is paramount.
SOLID is an acronym that stands for five different principles that have to do with clean object oriented code. Lately the term SOLID seems to get more widespread in the community of PHP developers. Talks are given, blogs are written and information is shared. What I'm missing in all these is a thorough explanation of why these principles matter. I see a lot of explanations of the principles, but the why is lacking. I will try to create a series showing the why of each of the five SOLID principles, starting with the S of Single responsibility.