Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M1358

Lasagna Code

Lasagna Code
BusinessHigh supportManagement
Included
account_tree

Updated 2026-07-30

Loading revision record…

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.

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/4

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%

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.

  • link
    en.wikipedia.orghttps://en.wikipedia.org/wiki/Spaghetti_codeZH · Explicit
    verified
account_treeGenealogyexpand_more

RELATED MODELS