Interface Segregation Principle

Definition
Make interfaces as specific as needed by the task.
Interface Segregation Principle

How does it work?

Creating interfaces with a large number of methods is easy, because one size fits all. But it creates many unnecessary dependencies which cause a small change to have large scale effects. In stead, reduce large interfaces into multiple smaller interfaces, tailored to the job at hand.

When should you use it?

  • It helps to build a maintainable system.

Links