Domain Driven Design Repository Vs Service
Also from the domain driven design with typescript series.
Domain driven design repository vs service. Quentin starin nov 11 10 at 22 36. First of all i want to clarify that i am new to domain driven design and i am asking this question because i have read something called anemic domain model. Domain driven design ddd advocates modeling based on the reality of business as relevant to your use cases.
In the context of building applications ddd talks about problems as domains. Check it out if you liked this post. Domain driven design dataservices vs repositories for domain models vs database models closed.
This post is part of a blog series asp net 10 years on. The interfaces to the data reside beside the dataservices in the dataservices folder while the core repository and domain info exist in the core project. In domain driven design there s a correct tool for every possible thing that needs to happen in the development of an object modeled system.
Not quite correct the original blue book does not dictate that domain services can t depend on a repository and in fact the vaugh vernon red book implementing domain driven design includes an example in chapter 7 of a domain service depending on a repository see businessprioritycalculator. Applied domain driven design ddd part 5 domain service domain service is not be confused with application service or web service. Domain service lives in the domain model layer.
It contradicts to basic principles of oop where data and behavior reside together. We have one generic repository. This post looks at creating a data access layer where the domain model is very different from the relational design of the database.
I believe it is important to understand the differences. Even though this is part of a. In plain english it means that it t nothing more then a procedure.