Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

... that is, the inputs and outputs of service functions ?

Are entities, or aggregates, allowed to leave service boundaries?

share|improve this question
Surely it does...The basic model of computing is Input-Processing-Output. Do DDD'ers just "process?" – Robert Harvey Oct 26 '10 at 1:18
@Robert Harvey: So, are entities, or aggregates, allowed to leave service boundaries? – Max Toro Oct 26 '10 at 1:57
up vote 3 down vote accepted

Yes (depending on your definition of service boundary) but in practice it's going to depend on the consumers of the services.

If it's within your own application then it won't be a problem (for example if a service is calling a couple of other services and returning a result based on those results).

If it's outside your application then you will want those services to be returning either simple values or more usually DTOs composed of simple values. If you don't do this then your consumers will typically break any time your domain changes (and DDD is best applied when you have a regularly changing domain).

In all this I'm assuming you're talking about domain services.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.