seniorClean Architecture
Clean Architecture and the 'Don't Repeat Yourself' (DRY) Trap.
Updated Apr 28, 2026
Short answer
In CA, it is often better to duplicate data structures (Mappers/DTOs) than to couple layers together.
Deep explanation
Developers often try to use the same 'User' class for the DB, the Domain, and the UI to be DRY. This is a mistake in CA. These models change for different reasons. Coupling them means a DB change can break your UI. CA prioritizes 'Decoupling' over 'DRY' at the boundaries.
Unlock with a Pro subscription to view this section.
View pricingReal-world example
No real-world example available yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProCommon mistakes
No common mistakes listed yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProFollow-up questions
No follow-up questions available yet.
Unlock with a Pro subscription to view this section.
Upgrade to Pro