Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M1259

Interface Segregation Principle

Interface Segregation Principle
CreateHigh supportDesign Thinking
Included
account_tree

Updated 2026-07-30

Loading revision record…

Summary

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. 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.

Definition

Clients should not be forced to depend on methods they do not use. Instead of a large interface, create multiple specialized interfaces. Scaffold use: on-demand allocation. Do not give users a remote control with 100 buttons if they only need power and volume. Overexposing information adds noise and risk.

How to use

On-demand allocation. Do not give users a remote control with 100 buttons if they only need power and volume. Overexposing information adds noise and risk.

Mechanism

It is one of the SOLID principles: fat interfaces force clients to depend on methods they do not need, increasing coupling, noise, and the scope of changes. Splitting into multiple fine-grained, single-responsibility specialized interfaces allows clients to depend only on the contracts they actually use, reducing coupling and change risk.

Practice

In progress 0/1

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%

Cases

  • A printer interface should not force fax methods; UI should only depend on data reading interfaces; microservices split APIs by consumer.

Common pitfalls

  • Over-segregation leads to interface explosion; treating ISP as 'not implementing if not used' (should be 'not depending'); ignoring role interfaces.
Sources

Source support: Explicit

References currently contain only Wikipedia links; primary sources still need review.

  • link
    en.wikipedia.orghttps://en.wikipedia.org/wiki/Interface_segregation_principleZH · Explicit
    verified
account_treeGenealogyexpand_more

RELATED MODELS