User Tools

Site Tools


principles:encapsulate_the_concept_that_varies

Encapsulate the Concept that Varies (ECV)

Variants and Alternative Names

Context

Principle Statement

Encapsulate the Concept that Varies, i.e. a design is better when those parts that vary are encapsulated in a separate module.

Description

Rationale

Strategies

Origin

Evidence

Relations to Other Principles

Generalizations

Specializations

Contrary Principles

  • More Is More Complex (MIMC): ECV demands adding a new class for a new varying concept.
  • Model Principle (MP): ECV sometimes results in classes which do not correspond top a real-world concept in the sense of MP. A “concept that varies” can also be a technical concept.

Complementary Principles

  • Dependency Inversion Principle (DIP): ECV may result in the creation of abstract classes (i.e. the concepts) and descendant concrete classes (i.e. the variations). DIP now tells that other classes should only depend on the abstractions.

Principle Collections

OOD Principle Language
General Principles Modularization Principles
KISS DRY GP MP IE LC HC

Example

Description Status

Further Reading

principles/encapsulate_the_concept_that_varies.txt · Last modified: 2021-09-02 19:36 by 65.21.179.175