Single Responsibility Principle
Updated 2026-07-28
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.
Introduction
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/4Practice this model in one real situation:
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.
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Single-responsibility_principleverified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS