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 [2012-12-17 22:45] – added link christian | principles:low_coupling [2021-09-02 20:34] – old revision restored (2021-03-29 03:10) 65.21.179.175 | ||
---|---|---|---|
Line 10: | Line 10: | ||
- | ===== Definition | + | ===== Principle Statement |
[[glossary: | [[glossary: | ||
Line 28: | Line 28: | ||
But if coupling is low, there are only few assumptions between the modules which can be violated. This reduces the chance of [[glossary: | But if coupling is low, there are only few assumptions between the modules which can be violated. This reduces the chance of [[glossary: | ||
+ | |||
+ | ===== Strategies ===== | ||
+ | |||
+ | * Indirection: | ||
+ | * Dependency Inversion/ | ||
+ | * Use lower form of coupling: | ||
+ | * Merge modules: | ||
+ | * Hide information | ||
===== Origin ===== | ===== Origin ===== | ||
Line 35: | Line 43: | ||
===== Evidence ===== | ===== Evidence ===== | ||
/* Comment out what is not applicable and explain the rest: */ | /* Comment out what is not applicable and explain the rest: */ | ||
- | / | + | /* |
* [[wiki: | * [[wiki: | ||
* [[wiki: | * [[wiki: | ||
- | / | + | /* |
Line 48: | Line 57: | ||
==== Specializations ==== | ==== Specializations ==== | ||
- | * [[principles:Information Expert]] | + | * [[Tell, don't Ask/Information Expert]] |
- | * [[principles: | + | * [[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. | ||
==== Contrary Principles ==== | ==== Contrary Principles ==== | ||
- | * [[principles:Keep It Simple Stupid]]: Reducing the coupling often involves the use of complicated interaction patterns, indirections, | + | * [[Keep It Simple Stupid]] |
+ | * [[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. | ||
==== Complementary Principles ==== | ==== Complementary Principles ==== | ||
- | * [[principles: | + | * [[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' |
- | * [[principles: | + | * [[Information Hiding/ |
==== Principle Collections ==== | ==== Principle Collections ==== | ||
Line 64: | Line 75: | ||
{{page> | {{page> | ||
{{page> | {{page> | ||
+ | {{page> | ||
===== Example ===== | ===== Example ===== | ||
Line 80: | Line 92: | ||
* [[wiki> | * [[wiki> | ||
* Martin Fowler: // | * Martin Fowler: // | ||
+ |
principles/low_coupling.txt · Last modified: 2021-10-18 21:49 by christian