Here is a good example that Chris Richardson posted in response to one of my questions of the DDD Yahoo! Group. If you haven’t done so already you should take a look at his presentation at SpringOne in June. It goes over all the major DDD topics and gives a really good description of DDD in general.
This is the same manner that I try to use Domain/Application Services although I have found that it’s easy to go overboard with a Service layer and IMO should only be implemented when necessary. There is really no reason to have a Service class that just wraps a Repository. It’s just extra code that needs to be maintained. In Chris’s exmaple though, he illustrates how a Service would retrieve data from one or more Repositories, performs some small amount of work and thats it.
I will be posting more on this later. Just wanted to share the example that I saw. Cheers!
September 6, 2007 at 12:59 am
Awesome presentation. That probably is the best presentation I’ve seen on DDD. There are lots of info in articles, books, etc. on DDD. But sometimes, a good presentation like that can be so much more valuable.
That’s exactly how I typically implement the service layer pattern. Very thin and simply coordinates the work to be done, usually with 1 or more repositories (injected via IoC container) and the domain model.
Looking forward to hearing your additional thoughts on domain/application services.