Good example of Domain Services

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!


One Response to “Good example of Domain Services”

  1. Joey Beninghove Says:

    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.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: