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 19:24] – 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 62: Line 48:
  
   * [[Model Principle]] (MP): DIP demands having abstractions. MP tells how these abstractions can look like.   * [[Model Principle]] (MP): DIP demands having abstractions. MP tells how these abstractions can look like.
 +  * [[Encapsulate the Concept that Varies]] (ECV): 
  
 ==== Principle Collections ==== ==== Principle Collections ====
principles/dependency_inversion_principle.txt · Last modified: 2021-10-18 21:23 by christian