... that is, the inputs and outputs of service functions ?
Are entities, or aggregates, allowed to leave service boundaries?
|
... that is, the inputs and outputs of service functions ? Are entities, or aggregates, allowed to leave service boundaries? |
|||||
|
|
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. |
|||
|
|