Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

13
  • 1
    How does this scale if there is a whole structure of dependant API classes? Is it still more manageable then the layer it's protecting the rest of the application from? Commented Jan 22, 2013 at 18:12
  • 12
    In other words, make sure that your API is indeed an improvement over one it hides, make sure that you don't just introduce another layer of corruption. That entire section is worthy of a bold tag. Commented Jan 29, 2015 at 22:30
  • 49
    Anti-corruption layers are nothing to do with dealing with poor quality APIs. They are about dealing with conceptual mismatches, adapting domains we could only use by "corrupting" our code to domains we can use more easily. Commented Jun 10, 2016 at 10:17
  • 35
    Ian Fairman got it right, while the author of this answer most definitely did not. If you go to the source of the concept (the DDD book), you'll find at least two things that contradict this answer: 1) an anti-corruption layer is created to avoid corrupting the new domain model that we are developing with elements from the model of an existing external system; it is not that the other system is "corrupted", in fact it may be perfectly good and well-designed; 2) an anti-corruption layer will usually contain several classes, often including Facades and Adapters, as well as Services. Commented Aug 24, 2016 at 1:39
  • 2
    so is this esentially a "mapper" ive been seeing in various ddd examples? Commented Oct 13, 2016 at 11:06