The Anti-Corruption Layer in Practice: Keeping a Clean Domain Away from Legacy Work Orders and SAP
We spent real effort making the domain model for our property and metering platform clean: aggregates that only speak in domain language, invariants enforced in one place, events that read like sentences a domain expert would say out loud. None of that survives contact with a work order that originates from a legacy field-service system built two decades ago, where a device status arrives as the string "4", a property reference is sometimes a plant code and sometimes a free-text address depending on which regional instance produced it, and a required field is occasionally just missing because a decades-old system does not enforce its own constraints consistently.