Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

[RESOLVED] Domain driven design (DDD) - nesting domains

Merrion

PowerPoster
Joined
Jul 26, 2002
Messages
2,148
Hi

Any thought on how to do a domain driven design architecture where one domain type is effectively nested within another?
For example if I have a [Fund] domain that has all the operations pertaining to a fund, but that fund has multiple [Fund Accounts] that wholly belong to the fund, but also have events that pertain to them alone?

How do I communicate/model something happening within the fund account (nested domain) that impacts the fund (outer domain) - for example let's say an investor adds a deposit to their fund account - this will increase the value of the fund accordingly. Should I look to have the fund account event trigger a fund level event, or should the fund aggregate read the event stream(s) of the fund accounts?
 

Merrion

PowerPoster
Joined
Jul 26, 2002
Messages
2,148
Re: Domain driven design (DDD) - nesting domains

Actually - looking at this again I think that if a domain is entirely nested within another then only the top-level domain needs to exist. It is only where there is an "overlap" that a separate domain and some form of inter-domain communication are required.
 
Top