Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M2531

SOLID Principles

SOLID Principles
CultureHigh supportAesthetics
Included
account_tree

Updated 2026-07-30

Loading revision record…

Summary

Five golden rules for building robust systems

Definition

Five golden rules for building robust systems. - SRP: Single Responsibility (a module should do only one thing). - OCP: Open/Closed Principle (open for extension, closed for modification). - LSP: Liskov Substitution (subtypes can replace their base types). - ISP: Interface Segregation (do not depend on interfaces you do not use). - DIP: Dependency Inversion (depend on abstractions, not concretions). Scaffold use: - System aesthetics: not only in coding, but also in designing department structures, SOLID should be followed. For example, SRP: if a department's responsibilities are not single, it will inevitably lead to buck-passing and inefficiency.

How to use

- System aesthetics: not only in coding, but also in designing department structures, SOLID should be followed. For example, SRP: if a department's responsibilities are not single, it will inevitably lead to buck-passing and inefficiency.

Mechanism

The five design principles together reduce coupling, increase cohesion and extensibility: SRP ensures changes only affect one place, OCP handles change through extension rather than modification, LSP guarantees safe inheritance semantics, ISP reduces interface pollution, and DIP makes high-level modules not depend on low-level details. They constrain design from five angles: responsibility, extension, substitution, interface, and dependency, making the system easier to modify, test, and evolve.

Practice

In progress 0/1

Practice this model in one real situation:

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

Cases

  • Putting 'send email' and 'log' in the same class violates SRP; extracting a Notification interface and letting high-level modules depend on it instead of concrete implementations applies DIP.

Common pitfalls

  • Over-abstracting for SOLID, creating many empty interfaces that are hard to understand; mechanically applying it in small scripts is often not worth the effort.
Sources

Source support: Explicit

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

account_treeGenealogyexpand_more

RELATED MODELS