Do Not Repeat Yourself
DRY
Kind: principle
Layer: Structural Core
Aliases: DRY, Do Not Repeat Yourself, Don't Repeat Yourself
Record: architecture:duplicate-code
Severity: mandatory
Scope: function, module, domain
Canonical: Ontology
A design rule that each piece of logic, constant or schema has one source in the code, and every other use refers to it.
Listed in Architecture principles, after Separation of Concerns and before High Cohesion.
Requires
Reinforces
Enables
Conflicts with
In tension with
Tensions
Violated by
Refactored by
Severity
Category
Enforced by
Detected by
Reinforced by
Linked from
- One home
- Counting copies
- The structural domain
- Separate, trade, or mitigate
- The principle architecture
- Core Modular Design
- Metaprogramming / Language-Oriented Architecture
- Schema / Canonical Data / Semantics
- Transactions / State / Concurrency
- Core Modular Design
- Quality Attributes
- Severity levels
- The resolutions