Anti-corruption layer (ACL)
A translation layer between your model and a legacy or external system, so its data shapes and quirks do not leak into your code.
An old ERP may call a customer by a cryptic code with seven status values; your code should not. The layer converts its requests and responses into your terms in one place, hides retries and odd error codes, and is the only code that changes when the other system does. It pairs with the strangler fig pattern when replacing a legacy system piece by piece.
Related terms
- Strangler fig pattern: Replacing a legacy system piece by piece, routing one feature at a time to new code until the old system can be switched off.
- DDD (domain-driven design): Designing software around the business’s own language and rules, with the code split where that language changes meaning.
- BFF (backend for frontend): A small backend built for one client, such as the web app or the mobile app, that shapes data exactly the way that client needs it.
