Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

... 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
add comment

1 Answer

up vote 2 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
add comment

Your Answer

 
discard

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.