SOLID is a mnemonic acronym that is used to define the five basic object-oriented design principles:
- Single Responsibility Principle
- Open-Closed Principle
- Liskov Substitution Principle
- Interface Segregation Principle
- Dependency Inversion Principle
The Interface Segregation Principle(ISP) states that if an interface becomes too long, it is better to split it into smaller pieces (interfaces) so that the client doesn't need to implement the ones in which they are not interested. In this recipe, we will understand what and why this is important.