jargon

Comparison

Interface segregation principlevsSOLID

Interface segregation principle

you implemented an eleven-method interface to get at one of them and threw not-implemented from the other ten.

The principle that a client should not be forced to depend on methods it does not use, which in practice means preferring several small role interfaces to one large one. The observable cost of getting it wrong is not aesthetic: every implementer is recompiled and every test double is rewritten when an unrelated method is added to the fat interface. Role interfaces also make it obvious what a collaborator is actually for, because the name describes the role rather than the class.

Full entry →

SOLID

someone rejected the pull request citing a five-letter acronym, and only two of the five letters were actually about the problem.

Five object-design principles collected under one acronym: single responsibility, open–closed, Liskov substitution, interface segregation and dependency inversion. Taken individually they are useful heuristics with genuine failure modes to point at; taken as a checklist they are the most reliable way to talk a team into more indirection than it needs. Being able to name all five and say honestly which ones you find load-bearing is a better interview answer than reciting them.

Full entry →

Related comparisons