principles:encapsulate_the_concept_that_varies
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:encapsulate_the_concept_that_varies [2013-01-30 16:10] – improved Further Reading christian | principles:encapsulate_the_concept_that_varies [2020-10-12 16:09] – old revision restored (2013-02-11 13:08) 159.69.186.191 | ||
---|---|---|---|
Line 64: | Line 64: | ||
==== Generalizations ==== | ==== Generalizations ==== | ||
- | |||
- | * [[Generalization Principle]] (GP): Encapsulating a varying concept typically results in a more generally applicable solution. This is especially true when an abstract concept is encapsulated by introducing an interface or an abstract class. | ||
==== Specializations ==== | ==== Specializations ==== | ||
Line 75: | Line 73: | ||
* **[[More Is More Complex]] (MIMC)**: ECV demands adding a new class for a new varying concept. | * **[[More Is More Complex]] (MIMC)**: ECV demands adding a new class for a new varying concept. | ||
- | * [[Keep It Simple Stupid]] (KISS): ECV demands adding a new class for a new varying concept. This adds complexity. | ||
* [[Model Principle]] (MP): ECV sometimes results in classes which do not correspond top a real-world concept in the sense of MP. A " | * [[Model Principle]] (MP): ECV sometimes results in classes which do not correspond top a real-world concept in the sense of MP. A " | ||
==== Complementary Principles ==== | ==== Complementary Principles ==== | ||
- | * [[Dependency Inversion Principle]] (DIP): ECV may result | + | * [[Low Coupling]] (LC): ECV results |
* [[Liskov Substitution Principle]] (LSP): ECV may result in the introduction of an abstract base class. Here it is important to get the abstraction right. Otherwise LSP may be violated. | * [[Liskov Substitution Principle]] (LSP): ECV may result in the introduction of an abstract base class. Here it is important to get the abstraction right. Otherwise LSP may be violated. | ||
- | + | * [[Generalization Principle]] (GP): Encapsulating a varying concept typically results in a more generally applicable solution. This is especially true when an abstract concept is encapsulated by introducing an interface or an abstract class. | |
+ | * [[Dependency Inversion Principle]] (DIP): ECV may result in the introduction of an abstract base class. Here DIP demands that other classes should only depend on this new abstract base class and not on the concrete subclasses. | ||
==== Principle Collections ==== | ==== Principle Collections ==== | ||
principles/encapsulate_the_concept_that_varies.txt · Last modified: 2021-10-18 21:31 by christian