As we make our way through the SOLID development journey, it's time we turned to the I in SOLID, which represents the Interface Segregation Principle (ISP):
SOLID OOP development – the interface segregation principle
The ISP definition
As with several of the other SOLID design concepts, this represents a scary name for an important topic. A dead simple definition of the ISP is that code should not be forced to depend on methods that it doesn't use.
If this is a bit fuzzy, don't worry, I'm going to walk you through a code example that clears it up.
Believe it or not, this is one of the easier SOLID concepts to understand and work with.