principles:single_responsibility_principle
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
principles:single_responsibility_principle [2012-12-05 16:46] – [Principle Collections] SOLID box christian | principles:single_responsibility_principle [2021-09-02 12:27] – old revision restored (2021-05-19 11:17) 65.21.179.175 | ||
---|---|---|---|
Line 9: | Line 9: | ||
===== Context ===== | ===== Context ===== | ||
/* fill in contexts here: */ | /* fill in contexts here: */ | ||
- | * [[contexts: | + | * [[contexts: |
+ | * [[contexts: | ||
+ | * [[contexts: | ||
+ | * [[contexts: | ||
- | + | ===== Principle Statement | |
- | ===== Definition | + | |
There should never be more than one reason for a [[glossary: | There should never be more than one reason for a [[glossary: | ||
Line 27: | Line 29: | ||
When this rule is not adhered to, one module has several tasks. If one of these tasks changes, there is the risk that this also has an effect on the other task that normally should be independent. Thus unrelated functionality may break. | When this rule is not adhered to, one module has several tasks. If one of these tasks changes, there is the risk that this also has an effect on the other task that normally should be independent. Thus unrelated functionality may break. | ||
+ | |||
+ | |||
+ | ===== Strategies ===== | ||
+ | |||
+ | |||
+ | ===== Caveats ===== | ||
+ | |||
+ | See section [[#contrary principles]]. | ||
===== Origin ===== | ===== Origin ===== | ||
/* the *primary* source */ | /* the *primary* source */ | ||
+ | {{page> | ||
===== Evidence ===== | ===== Evidence ===== | ||
/* Comment out what is not applicable and explain the rest: */ | /* Comment out what is not applicable and explain the rest: */ | ||
- | / | + | /* |
- | / | + | /* |
- | [[wiki: | + | |
- | / | + | * [[wiki: |
+ | |||
+ | /* | ||
Line 45: | Line 57: | ||
==== Generalizations ==== | ==== Generalizations ==== | ||
- | * [[principle:High Cohesion]] | + | * [[High Cohesion]] |
+ | * [[Encapsulate the Concept that Varies]] (ECV) | ||
==== Specializations ==== | ==== Specializations ==== | ||
Line 53: | Line 65: | ||
==== Complementary Principles ==== | ==== Complementary Principles ==== | ||
- | * [[principles: | ||
==== Principle Collections ==== | ==== Principle Collections ==== | ||
{{page> | {{page> | ||
- | ===== Example | + | ===== Examples |
===== Description Status ===== | ===== Description Status ===== | ||
/* Choose one of the following and comment out the rest: */ | /* Choose one of the following and comment out the rest: */ | ||
- | [[wiki: | + | /*[[wiki: |
- | /*[[wiki: | + | [[wiki: |
/ | / | ||
===== Further Reading ===== | ===== Further Reading ===== | ||
- | * Robert C. Martin: //Agile Software Development, | + | * {{page> |
* [[http:// | * [[http:// | ||
* [[wiki> | * [[wiki> | ||
Line 76: | Line 87: | ||
* [[wp> | * [[wp> | ||
* [[http:// | * [[http:// | ||
+ | |||
+ | ===== Discussion ===== | ||
+ | |||
+ | Discuss this wiki article and the principle on the corresponding [[talk: |
principles/single_responsibility_principle.txt · Last modified: 2021-10-18 22:01 by christian