User Tools

Site Tools


principles:dependency_inversion_principle

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:dependency_inversion_principle [2013-02-25 14:41] – strategies, caveats christianprinciples:dependency_inversion_principle [2021-09-02 12:23] – old revision restored (2021-05-11 21:48) 65.21.179.175
Line 19: Line 19:
  
 ===== Strategies ===== ===== Strategies =====
- 
-  * Apply the [[patterns:Dependency Inversion]] Pattern 
-  * Apply other forms of [[glossary:dependency inversion]] 
-  * Have an ''interface'' type for every class 
-  * Declare only ''interface'' types so that an object variable generally has an ''interface'' as static type and a concrete class as dynamic type 
- 
- 
-===== Caveats ===== 
- 
-It is normally not helpful to apply DIP to [[patterns:value objects]]. 
- 
-Furthermore note that applying [[patterns:dependency inversion]] pattern (see [[#strategies]]) introduces an abstraction. FIXME explain Super-A vs. ReqByB 
- 
-See section [[#contrary principles]]. 
  
  
Line 50: Line 36:
  
 ==== Generalizations ==== ==== Generalizations ====
- 
-  * [[Low Coupling]] (LC): 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. 
  
 ==== Specializations ==== ==== Specializations ====
  
 ==== Contrary Principles ==== ==== Contrary Principles ====
- 
-  * [[More Is More Complex]] (MIMC): DIP demands introducing abstractions, especially abstract classes or interfaces. 
  
 ==== Complementary Principles ==== ==== Complementary Principles ====
  
-  * [[Model Principle]] (MP)DIP demands having abstractions. MP tells how these abstractions can look like.+  * [[principles:High Cohesion]] 
 +  * [[principles:Low Coupling]] 
 +  * [[principles:Model Principle]] 
 +  * [[principles:Encapsulate the Concept that Varies]]
  
 ==== Principle Collections ==== ==== Principle Collections ====
principles/dependency_inversion_principle.txt · Last modified: 2021-10-18 21:23 by christian