User Tools

Site Tools


principles:encapsulate_the_concept_that_varies

This is an old revision of the document!


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
ML KISS MIMC DRY GP RoE
Modularization Principles
MP HC ECV
Module Communication Principles
TdA/IE LC DIP
Interface Design Principles
EUHM PLS UP
Internal Module Design Principles
IH/E IAP LSP PSU

Example

Description Status

Further Reading

principles/encapsulate_the_concept_that_varies.1630578374.txt.gz · Last modified: 2021-09-02 12:26 by 65.21.179.175