Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M8075

Single Responsibility Principle

Single Responsibility Principle
CreateHigh supportDesign Thinking
Included
account_tree

Updated 2026-07-28

Loading revision record…

Summary

The single-responsibility principle (SRP) is a computer programming principle that states that "A module should be responsible to one, and only one, actor." The term actor refers to a group (consisting of one or more stakeholders or users) that requires a change in the module.

Definition

The single-responsibility principle (SRP) is a computer programming principle that states that "A module should be responsible to one, and only one, actor." The term actor refers to a group (consisting of one or more stakeholders or users) that requires a change in the module.

How to use

The single-responsibility principle (SRP) is a computer programming principle that states that "A module should be responsible to one, and only one, actor." The term actor refers to a group (consisting of one or more stakeholders or users) that requires a change in the module.

Mechanism

When a component changes for only one reason, the impact of modifications is minimized and predictability is maximized; multiple responsibilities cause changes from different needs to interfere with each other, leading to unexpected regressions and finger-pointing.

Practice

In progress 0/4

Practice this model in one real situation:

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

Cases

  • A report module both fetches data and renders it → split into data layer and presentation layer; a role is responsible for only one core metric.

Common pitfalls

  • Confusing with 'single function' (should be single reason for change); over-splitting into fragments; ignoring collaboration overhead.
Sources

Source support: Explicit

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

  • link
    en.wikipedia.orghttps://en.wikipedia.org/wiki/Single-responsibility_principleZH · Explicit
    verified
account_treeGenealogyexpand_more

RELATED MODELS