DDD Infrastructure services
Posted
by Zygimantas
on Stack Overflow
See other posts from Stack Overflow
or by Zygimantas
Published on 2009-09-05T18:42:39Z
Indexed on
2010/05/12
15:54 UTC
Read the original article
Hit count: 200
Hello, I am learning DDD and I am a little bit lost in Infrastructure layer:
As I understand, "all good DDD applications" should have 4 layers: Presentation, Application, Domain and Infrastructure. Database should be accessed using Repositories. Repository interfaces should be in Domain layer and repository implementation - in Infrastructure (reference http://stackoverflow.com/questions/693221/ddd-where-to-keep-domain-interfaces-the-infrastructure).
Application, Domain and Infrastructure layer should/may have services (reference www.lostechies.com/blogs/jimmy_bogard/archive/2008/08/21/services-in-domain-driven-design.aspx), in example EmailService in Infrastructure layer which sends Email messages.
BUT, inside Infrastructure layer we have repository implementations, which are used to access database. So, in this case, repositories are database services? What is the difference between Infrastructure service and repository?
Thanks in advance!
© Stack Overflow or respective owner