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-11-06 16:43] – [Rationale] christian | principles:low_coupling [2020-10-12 12:34] – old revision restored (2020-02-17 00:48) 159.69.186.191 | ||
---|---|---|---|
Line 27: | Line 27: | ||
* //No coupling//: The modules do not know each other. | * //No coupling//: The modules do not know each other. | ||
* //Call coupling//: A module calls another one. | * //Call coupling//: A module calls another one. | ||
+ | * // | ||
* //Data coupling//: A module calls another one passing parameters to it. | * //Data coupling//: A module calls another one passing parameters to it. | ||
* //Stamp coupling//: A module calls another one passing complex parameters to it. | * //Stamp coupling//: A module calls another one passing complex parameters to it. | ||
Line 46: | Line 47: | ||
If a module //A// interacts with a module //B//, there is a certain dependency between these modules. When for example //A// uses a certain functionality of //B//, then //A// depends on //B//. //A// makes the assumption that //B// provides a certain service, and moreover it makes assumptions on how this service can be used (by which mechanism, which parameters, etc.). If one of these assumptions is not true anymore because //B// has changed for some reason, //A// also has to change. So the fewer dependencies there are, the less likely it is that //A// stops working and has to be changed. | If a module //A// interacts with a module //B//, there is a certain dependency between these modules. When for example //A// uses a certain functionality of //B//, then //A// depends on //B//. //A// makes the assumption that //B// provides a certain service, and moreover it makes assumptions on how this service can be used (by which mechanism, which parameters, etc.). If one of these assumptions is not true anymore because //B// has changed for some reason, //A// also has to change. So the fewer dependencies there are, the less likely it is that //A// stops working and has to be changed. | ||
- | Furthermore if //A// makes many and detailed assumptions about //B//, there is also a high probability that //A// has to change despite only relying | + | Furthermore if //A// makes many and detailed assumptions about //B//, there is also a high probability that //A// has to change despite only relying |
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: |
principles/low_coupling.txt · Last modified: 2021-10-18 21:49 by christian