ALL-DESI1002 · design_pattern_fit
Judge whether a design pattern earns its structure.
This is a contextual rule for all languages. Read its implementation.
Definition
Section titled “Definition”Compare current variation, change pressure, collaboration, ownership, alternatives, and added indirection with the forces of the proposed or existing pattern. The criteria independently establish recurring variation, existing structure, matched forces, reduced change coupling, and whether direct code is clearer.
Evidence
Section titled “Evidence”Findings cite variants, change sites, collaborators, tests, and simpler alternatives.
Exceptions
Section titled “Exceptions”Framework contracts may impose a pattern even when project variation is small.
Examples
Section titled “Examples”Strategy fits several interchangeable pricing algorithms. A factory around one direct
constructor with no variation is likely premature.
References
Section titled “References”- Cites “Design Patterns”
- Cites “Refactoring Guru”, design patterns
- Cites “patos documentation”, pattern contracts