WAF Anti-Corruption Layer Pattern
May 13, 2025•256 words•2 min read•
azure
design patterns
operational excellence
Category | Description | WAF Description |
---|---|---|
What | A pattern that introduces a layer between two subsystems to prevent undesirable dependencies and preserve the integrity of the internal model. | Implement a façade or adapter layer between different subsystems that don't share the same semantics. |
Used with | Legacy systems, external services, or when integrating systems with differing models, protocols, or technologies. | Legacy application is migrated to a modern system and it may still need existing legacy resources. |
When | When you need to integrate with another system but want to avoid leaking its model or logic into your own application domain. | Need to ensure that an application's design is not limited by dependencies on outside subsystems. |
Not Suitable For | Systems that already share the same domain model or when maintaining the anti-corruption layer introduces unnecessary complexity or latency. | No significant semantic differences between new and legacy systems. |
Related To | Adapter pattern, Façade pattern, Gateway pattern, Bounded Context (from DDD). | Strangler Fig, Messaging Bridge |
A basic implementation of the Anti-Corruption Layer pattern can be found here.
The full WAF description of the pattern can be found here.