Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M4787

Anti-Corruption Layer, ACL

Anti-Corruption Layer, ACL
BehaviorHigh supportPsychology
Included
account_tree

Updated 2026-08-10

Loading revision record…

Summary

An isolation layer that translates between a well-designed system and a messy external one so foreign logic cannot leak inward.

Definition

Described in domain-driven design by Eric Evans, the anti-corruption layer is an adapter placed between a system and an external model that it must interact with but does not control. The layer translates requests and responses, mapping the foreign model into the local one, and prevents concepts from the external system from shaping the internal design. Key qualification: the layer adds maintenance cost and latency, and it only works when translation is complete, since any shortcut allows the foreign model to leak through.

How to use

- Draw the boundary: identify which external systems have models you do not want inside your core. - Translate completely: convert foreign concepts into your own vocabulary at the boundary. - Contain the mess: let the layer absorb quirks so the core only ever sees a clean model.

Mechanism

Models spread through the interfaces they touch, so integrating directly with a poorly designed external system imports its assumptions into your own design. Inserting a translation boundary stops that propagation, because the core communicates only in its own terms. The cost is an additional component to maintain, but it preserves the coherence of the internal model over time.

Practice

In progress 0/1

Practice this model in one real situation:

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

Cases

  • Teams integrating with a legacy enterprise system often add a translation layer rather than importing its data model.
  • Payment integrations commonly wrap third-party APIs so that a provider change touches only one adapter.
  • Organizations negotiating with adversarial partners keep a formal review step to avoid absorbing their norms.

Common pitfalls

  • Treating the layer as universal glue and letting it accumulate unrelated responsibilities until it is unmaintainable.
  • Allowing partial translation shortcuts, which lets the foreign model leak into the core anyway.
  • Ignoring the ongoing maintenance cost of a layer that must track changes in the external system.
Sources

Source support: Explicit

  • link
    learn.microsoft.comhttps://learn.microsoft.com/en-us/azure/architecture/patterns/anti-corruption-layerZH · Explicit
    verified
account_treeGenealogyexpand_more

RELATED MODELS