Interface segregation principle

In the field of software engineering, the interface segregation principle (ISP) states that no code should be forced to depend on methods it does not use.[1] ISP splits interfaces that are very large into smaller and more specific ones so that clients will only have to know about the methods that are of interest to them. Such shrunken interfaces are also called role interfaces.[2] ISP is intended to keep a system decoupled and thus easier to refactor, change, and redeploy. ISP is one of the five SOLID principles of object-oriented design, similar to the High Cohesion Principle of GRASP.[3] Beyond object-oriented design, ISP is also a key principle in the design of distributed systems in general and one of the six IDEALS principles for microservice design.[4]

  1. ^ Martin, Robert (2002). Agile Software Development: Principles, Patterns, and Practices. Pearson Education.
  2. ^ Role Interface
  3. ^ "David Hayden, Interface-Segregation Principle (ISP) - Principles of Object-Oriented Class Design". Archived from the original on 2010-08-20. Retrieved 2009-11-07.
  4. ^ Paulo Merson,Principles for Microservice Design: Think IDEALS, Rather than SOLID, The InfoQ eMag Issue #91, February 2021