Skip to content

Instantly share code, notes, and snippets.

@jaymecd
Forked from jacegu/gist:6091719
Last active August 29, 2015 14:14
Show Gist options
  • Save jaymecd/05790fe5612a8dcd755a to your computer and use it in GitHub Desktop.
Save jaymecd/05790fe5612a8dcd755a to your computer and use it in GitHub Desktop.

The differences between a domain service and an application services are subtle but critical:

  • Domain services are very granular where as application services are a facade purposed with providing an API.
  • Domain services contain domain logic that can’t naturally be placed in an entity or value object whereas application services orchestrate the execution of domain logic and don’t themselves implement any domain logic.
  • Domain service methods can have other domain elements as operands and return values whereas application services operate upon trivial operands such as identity values and primitive data structures.
  • Application services declare dependencies on infrastructural services required to execute domain logic.
  • Command handlers are a flavor of application services which focus on handling a single command typically in a CQRS architecture.

Source: http://gorodinski.com/blog/2012/04/14/services-in-domain-driven-design-ddd/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment