principles:low_coupling
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:low_coupling [2013-06-22 20:42] – christian | principles:low_coupling [2021-09-02 12:46] – old revision restored (2021-05-11 22:05) 65.21.179.175 | ||
---|---|---|---|
Line 7: | Line 7: | ||
===== Context ===== | ===== Context ===== | ||
/* fill in contexts here: */ | /* fill in contexts here: */ | ||
- | * [[contexts: | + | * [[contexts: |
- | * [[contexts: | + | |
- | * [[contexts: | + | |
Line 38: | Line 36: | ||
* Merge modules: | * Merge modules: | ||
* Hide information | * Hide information | ||
- | |||
- | ===== Caveats ===== | ||
- | |||
- | Coupling can be reduced by several technical measures (see [[# | ||
- | |||
- | Furthermore note that coupling to a stable module is often no problem. The problematic cases are couplings to unstable modules. This means that applying decoupling strategies is beneficial when a coupling to an unstable module is reduced. But it may not be beneficial in the other cases. | ||
- | |||
- | See also section [[#contrary principles]]. | ||
- | |||
===== Origin ===== | ===== Origin ===== | ||
Line 57: | Line 46: | ||
* [[wiki: | * [[wiki: | ||
- | * [[wiki: | + | * [[wiki: |
/* * [[wiki: | /* * [[wiki: | ||
Line 68: | Line 57: | ||
==== Specializations ==== | ==== Specializations ==== | ||
+ | * [[Tell, don't Ask/ | ||
* [[Constantine' | * [[Constantine' | ||
* [[Dependency Inversion Principle]] (DIP): LC aims at reducing the dependencies to other modules. One way to do so is to only depend on abstractions. DIP is about this aspect. | * [[Dependency Inversion Principle]] (DIP): LC aims at reducing the dependencies to other modules. One way to do so is to only depend on abstractions. DIP is about this aspect. | ||
Line 75: | Line 65: | ||
* [[Keep It Simple Stupid]] (KISS): Reducing the coupling often involves the use of complicated interaction patterns, indirections, | * [[Keep It Simple Stupid]] (KISS): Reducing the coupling often involves the use of complicated interaction patterns, indirections, | ||
* [[High Cohesion]] (HC): A system consisting of one single module has a very low coupling as there are no dependencies on other modules. But such a system also has low cohesion. The other extreme, very many highly cohesive modules, naturally has a higher coupling between the modules. So here a compromise has to be found. | * [[High Cohesion]] (HC): A system consisting of one single module has a very low coupling as there are no dependencies on other modules. But such a system also has low cohesion. The other extreme, very many highly cohesive modules, naturally has a higher coupling between the modules. So here a compromise has to be found. | ||
- | * [[Rule of Explicitness]] (RoE): Direct communication typically has the disadvantage of a higher coupling. Indirection reduces coupling but creates implicit/ | + | |
==== Complementary Principles ==== | ==== Complementary Principles ==== | ||
- | * [[Tell, don't Ask/ | ||
* [[Model Principle]] (MP): LC aims at reducing the dependencies to other modules. So a module shall depend on only a few others. MP now tells which dependencies are allowed and which aren' | * [[Model Principle]] (MP): LC aims at reducing the dependencies to other modules. So a module shall depend on only a few others. MP now tells which dependencies are allowed and which aren' | ||
* [[Information Hiding/ | * [[Information Hiding/ | ||
Line 88: | Line 77: | ||
{{page> | {{page> | ||
- | ===== Examples | + | ===== Example |
Line 103: | Line 92: | ||
* [[wiki> | * [[wiki> | ||
* Martin Fowler: // | * Martin Fowler: // | ||
- | * Craig Larman: //Applying UML and Patterns – An Introduction to Object-Oriented Analysis and Design and Iterative Development// | ||
- | |||
- | ===== Discussion ===== | ||
- | Discuss this wiki article and the principle on the corresponding [[talk: |
principles/low_coupling.txt · Last modified: 2021-10-18 21:49 by christian