User Tools

Site Tools


principles:low_coupling

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
principles:low_coupling [2013-01-15 11:17] – pragprog christianprinciples:low_coupling [2021-09-02 20:34] – old revision restored (2021-03-29 03:10) 65.21.179.175
Line 31: Line 31:
 ===== Strategies ===== ===== Strategies =====
  
 +  * Indirection: 
 +  * Dependency Inversion/Abstract Couplings:
 +  * Use lower form of coupling:
 +  * Merge modules:
 +  * Hide information
  
 ===== Origin ===== ===== Origin =====
Line 52: Line 57:
 ==== Specializations ==== ==== Specializations ====
  
-  * [[principles:Information Expert]] +  * [[Tell, don't Ask/Information Expert]] (TdA/IE): Adhering to the information expert principle leads to low coupling as there is less need to communicate with other modules to get the necessary information. 
-  * [[principles:Constantine's Law]]+  * [[Constantine's Law]]: Constantine's Law is just the combination of the two principles LC and HC. 
 +  * [[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, etc.+  * [[Keep It Simple Stupid]] (KISS): Reducing the coupling often involves the use of complicated interaction patterns, indirections, etc
 +  * [[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:High Cohesion]] +  * [[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't. 
-  * [[principles:Model Principle]]+  * [[Information Hiding/Encapsulation]] (IH/E): Higher forms of couplings (especially content couplings) break encapsulation.
  
 ==== Principle Collections ==== ==== Principle Collections ====
principles/low_coupling.txt · Last modified: 2021-10-18 21:49 by christian