SOLID Principles
Every software engineer should know SOLID principles. These principles are concrete blocks of software developing. I thought SOLID is a good choice for my very first article.
Softwares are living things. Some projects are living for decades. The principles makes these softwares flexible, reuseable, maintainable and readable.
The main purposes are:
- Softwares that is easily adapted to the new requirements in the future.
- Adding new features to the code by making the less changes.
- Reducing time for refactoring.
You can prevent your project to become more complex when it grows.
Get Mustafa Kurt’s stories in your inbox
Join Medium for free to get updates from this writer.
SOLID stands for initials of five priciples. These are;
Single-responsibility principle
A class should have one responsibility. And can be changed for only this responsibility. A class should do one thing and do it well.
Open-closed principle
A Class or method should preserve already existing properties and not allow changes. In other words, a class must be open for adding new properties but closed for changing existing things.
Liskov substitution principle
Objects of a superclass shall be replaceable with objects of its subclasses without breaking the application. That requires the objects of your subclasses to behave in the same way as the objects of your superclass.
Interface segregation principle
Instead of using one interface for requirements, split them more than one customized interfaces.
Dependency inversion Principle
Dependencies between classes should be as minimum as possible.
I will write new articles which have more details and example codes for each princible. As I said before, I thought SOLID is a good choice for my very first article. Thanks for your patience :)



