Skip to main content
26 events
when toggle format what by license comment
May 14, 2023 at 16:50 comment added gnat @emeraldhieu anticorruption layer is used when one has no option to improve like you describe. You can think of Messy class for example as coming from some external library which you just can not modify for some reason
May 13, 2023 at 9:05 comment added emeraldhieu Regarding the Messy class, how about passing "param" to the constructor so that it's not repeated in the main code? Why would you need a wrapper class like Reasonable?
Feb 3, 2018 at 10:45 comment added D Drmmr Your example only introduces more code duplication.
Jul 28, 2017 at 13:12 history edited Deduplicator CC BY-SA 3.0
added syntax-highlighting
May 23, 2017 at 12:40 history edited CommunityBot
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Apr 12, 2017 at 7:31 history edited CommunityBot
replaced http://programmers.stackexchange.com/ with https://softwareengineering.stackexchange.com/
S Nov 11, 2016 at 23:55 history suggested Choylton B. Higginbottom CC BY-SA 3.0
Grammar fixes and improvements.
Nov 11, 2016 at 19:17 review Suggested edits
S Nov 11, 2016 at 23:55
Oct 13, 2016 at 11:06 comment added filthy_wizard so is this esentially a "mapper" ive been seeing in various ddd examples?
Aug 24, 2016 at 1:39 comment added Rogério 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.
Jun 10, 2016 at 10:17 comment added Ian Fairman 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.
May 7, 2016 at 21:30 review Suggested edits
May 9, 2016 at 3:38
Jan 29, 2015 at 22:30 comment added Lilienthal 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.
Jan 24, 2013 at 3:47 history edited gnat CC BY-SA 3.0
minor wordsmithing
Jan 23, 2013 at 15:13 comment added Neil @Knownasilya, that's an excellent observation, you're probably right.
Jan 23, 2013 at 14:58 comment added knownasilya @Neil I think that would be the Facade and Adapter patterns, since JPA is a good ORM specification, in my opinion.
Jan 23, 2013 at 12:43 comment added Neil This is a technique that helps a great deal with JPA and JSF, using an anti-corruption lair to access the actual entity and keep the raw entity information clean without having it directly accessed by the web application.
Jan 23, 2013 at 8:23 history edited gnat CC BY-SA 3.0
quality issues += http://programmers.stackexchange.com/a/101567/31260 "'The only valid measurement of code quality: WTFs / minute'"
Jan 23, 2013 at 1:38 comment added knownasilya You read my mind about the whole API/Adapter and Facade vs Anti-Corruption.
Jan 22, 2013 at 21:50 history edited gnat CC BY-SA 3.0
difference between this and related patterns Adapter and Facade
Jan 22, 2013 at 18:41 history edited gnat CC BY-SA 3.0
"scaling" clarified per comments // http://programmers.stackexchange.com/questions/184464/what-is-an-anti-corruption-layer-and-how-is-it-used/184472#comment354554_184472
Jan 22, 2013 at 18:36 comment added gnat @Knownasilya that's a very good question, answer expanded to address that
Jan 22, 2013 at 18:35 history edited gnat CC BY-SA 3.0
"scaling" clarified per comments // http://programmers.stackexchange.com/questions/184464/what-is-an-anti-corruption-layer-and-how-is-it-used/184472#comment354554_184472
Jan 22, 2013 at 18:13 vote accept knownasilya
Jan 22, 2013 at 18:12 comment added knownasilya 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?
Jan 22, 2013 at 17:19 history answered gnat CC BY-SA 3.0