Interface Segregation Principle
The Interface Segregation Principle (ISP) is a software design guideline that suggests clients should not be forced to depend on interfaces they do not use. This principle encourages the creation of smaller, more specific interfaces rather than a large, general-purpose one. By doing so, developers can ensure that classes only implement the methods that are relevant to them, leading to cleaner and more maintainable code.
Following the ISP helps reduce the impact of changes in the codebase. When interfaces are tailored to specific needs, modifications in one part of the system are less likely to affect unrelated components. This results in a more robust architecture, making it easier to adapt to new requirements over time.