Lasagna Code
Updated 2026-07-30
Summary
Refers to over-layered architecture.
Definition
Refers to over-layered architecture. Although the layers are clear (presentation, business, data...), modifying a simple feature requires penetrating every layer and modifying files in each layer, which is extremely cumbersome. Scaffold use: Beware of over-abstraction. If your company has too many reporting levels or processes are too rigid, you are in the 'Lasagna Code dilemma'. Sometimes, flattening (reducing layers) is more important than structuring.
Introduction
How to use
Beware of over-abstraction. If your company has too many reporting levels or processes are too rigid, you are in the 'Lasagna Code dilemma'. Sometimes, flattening (reducing layers) is more important than structuring.
Mechanism
Refers to a system being divided into too many layers (presentation, business, data...), each with a single responsibility but with severe vertical coupling overall. The mechanism is that 'decoupling for the sake of decoupling' creates new coupling—modifying an end-to-end feature requires synchronized changes in every layer's files, with long call chains and difficult troubleshooting.
Practice
In progress 0/4Practice this model in one real situation:
Cases
- An enterprise application sets up seven or eight layers for 'standardization', and adding a field requires modifying over ten files such as DTO, Entity, VO, Mapper; in an organization, changing a piece of copy requires five approvals.
Common pitfalls
- Dogmatizing 'layering = good architecture'; measuring engineering quality by the number of layers; ignoring that vertical coupling is more fatal than horizontal coupling.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Spaghetti_codeverified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS