Principle of Interface Segregation in Object Oriented Design (SOLID)

Author
By Darío Rivera
Posted On in SOLID

In a previous post we saw an introduction to SOLID Principles as a purely theoretical way. Today we will see everything about the fourth SOLID principle on the list, The Interface Segregation Principle. Let's start by giving a definition of this principle.

Definition

This principle states that a client should not be forced to implement an interface that it does not use. Stated alternatively, many client-specific interfaces are better than a general-purpose interface. If a method or function receives a dependency that implements other methods that are not of interest, a segregation must be performed and a specific interface created.


Acerca de Darío Rivera

Author

Ingeniero de desarrollo en PlacetoPay , Medellín. Darío ha trabajado por más de 6 años en lenguajes de programación web especialmente en PHP. Creador del microframework DronePHP basado en Zend y Laravel.

Sólo aquellos que han alcanzado el éxito saben que siempre estuvo a un paso del momento en que pensaron renunciar.