Back to Catalog
Microservices
Migration & Refactoring
Anti-Corruption Layer
Translator between your clean new domain model and the gnarly legacy one.
Intent & Description
Real-world Use Case
Legacy system uses “ClientAccount” with 40 fields. New Customer Service uses a clean “Customer” aggregate. ACL maps ClientAccount → Customer on every call, keeping your new model pristine.
Source
📌 TL;DR
ACL is your hazmat suit when touching legacy code. Translate at the boundary, keep new services clean.
Advantages
- New services stay clean — zero legacy contamination
- Enables incremental migration without big bang rewrites
- Clear explicit translation layer = easier to audit and replace
- Teams can work independently on each side
Disadvantages
- Extra code to write and maintain (the ACL itself)
- Translation layer can lag if legacy model changes frequently
- Adds a runtime hop / potential latency
- Can become complex if legacy model is deeply inconsistent