Anticorruption Layer — An effective Shield

“But when the other side of the boundary starts to leak through, the translation layer may take on a more defensive tone.”

“When systems based on different models are combined, the need for the new system to adapt to the semantics of the other system can lead to a corruption of the new system’s own”

Even if you are able to avoid creating a Big Ball of Mud by employing DDD techniques, you may still need to integrate with one or more. If you must integrate with one or more, try to create an Anticorruption Layer against each legacy system in order to protect your own model from the cruft that would otherwise pollute your model with the incomprehensible morass.

An example

Translating models

Ready for failures

Improving our service

Integration testing

Only Mock Types That You Own. Don’t Mock Types You Can’t Change




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store