Understanding the SOLID Principles

This article is about the SOLID principles and it is called “Understanding the SOLID Principles”, this article show us this principles in detail and well this principles are focused into allowing developers implement the best practices in the creation of objects and classes according to the situation that they have, SOLID is an acronym that means the five principles of object oriented programming and design and these principles are…

Single Responsibility, focuses on the creation and verification of classes that should have exactly one responsibility which makes the classes more clean and we should maintain an standard development methodology. Then, Open/Closed Principle where the classes should have one characteristic when inheriting because they should be extendable preferred to modifiable and a class have to be constructed in order to be flexible and adaptable for the conditions that exist in the particular situation.

The third principle is called Liskov Substitution and this one thinks that we should avoid inheritance when is possible, providing flexibility, the fourth is called Interface Segregation Principle and it tells us that smaller interfaces are better and finally we have Dependency Inversion which wants to write code that refers to interfaces instead of code that refers to actual classes and we avoid dependency to make everything more concrete.

These are the best practices and reading about them I truly believe that if we used this practices we would improve our ability a lot.

Comentarios

Entradas populares de este blog

Ethical Reflection on Ready Player One

Microservices

Is design dead?