Anti-Corruption Layer
An anti-corruption layer translates between your domain model and an external one, so a foreign model cannot leak across a context boundary. A legacy or third-party system will happily impose its model on yours if you share types across the seam; you translate at the edge instead. It is one of the relationships a context map can name.
Keep it distinct from a hexagonal adapter: an anti-corruption layer is wider than a driven adapter. An adapter is one constituent of an ACL, the technical translation point, not a synonym for the whole pattern, which also owns the model mapping and the boundary decision.
Signal: there is a clear seam where the external vocabulary stops and yours begins, and no external type appears in your domain model. Part of Domain-Driven Design.
Sources
- Eric Evans, Domain-Driven Design Reference (2015): the Anti-Corruption Layer as a translation layer at a context boundary, one of the relationships a context map can name.
- Alistair Cockburn, Hexagonal Architecture: ports and adapters, the driven adapter an ACL is wider than.