anti-corruption layer

401 views
Skip to first unread message

Maciej Hadam

unread,
Nov 10, 2011, 3:17:29 PM11/10/11
to ddd-cqrs-sample
Hi everyone ;)

I was wondering what's the best way to create anti-corruption layer?
On the blog http://www.markhneedham.com/blog/2009/07/07/domain-driven-design-anti-corruption-layer/
author is saying that the repository can be the anti-corruption layer.
I agree with this blog.In the past(before DDD mental revolution in my
mind) i've made that tricks, and it worked well .

In DomainDrivenDesignBusinessDeveloperMentalModel, the "anti-
corruption" was mentioned once while describing the event listeners.


So right now we have 2 building blocks that realizes the anti-
corruption layer role (repository, event listener). Do someone has
examples of other building blocks that realizes anti-corruption layer
role?

Do we need to mark additionally that some building block has also the
anit-corruption layer resposibility?

I'm waiting to yours opinions?

Sławomir Sobótka

unread,
Nov 10, 2011, 3:44:47 PM11/10/11
to ddd-cqr...@googlegroups.com
In my understanding, in general ACL is about integration (something
with something)

So we can integrate via data - using Repo (elegant, but integrating
via data may not always be sufficient).
We can also integrate via behavior - using Services (infrastructure
layer services, or maybe some business service form domain layer).
Our wiki mentions highly decoupled and potentially asynchronous way of
integration - events (strong technique, but not always suitable).

I can see this three "channels" of the integration, but of course the
most important thing it the main idea: avoid corrupting our brand new
shiny model with "complicated interface", "messy class", "irrelevant
stuff", "You don't want to even know" - pure evil stuff defined by
Eric Evans on this picture:
http://art-of-software.blogspot.com/2009/09/anticorruption-layer.html

Reply all
Reply to author
Forward
0 new messages