Anti-Corruption Layer, ACL
Updated 2026-08-10
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.
Introduction
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/1Practice this model in one real situation:
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
- learn.microsoft.comhttps://learn.microsoft.com/en-us/azure/architecture/patterns/anti-corruption-layerverified
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