Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>When I first started with DDD, I also wrestled with the Context + Domain + Module + Model organization of things as well.</p> <p>DDD is really meant to be a guide to building your domain models. Once I stopped trying to sub-organize my Contexts and boundies, and started thinking of what really is shared between entities - things started to fit together better.</p> <p>I actually do not use contexts, unless it is a completely different application (app = context). Just my preference. But, I do have Modules that only share base abstracts and interfaces common throughout code (IRepository, IComponent, etc). The catch is, DDD says that Modules can share entities between modules - but, only on a very limited scale (you really don't want to do it often).</p> <p>With that in mind, I would get away from using contexts and move to a "what really am I trying to accomplish, what do these models have in common). Here's what I would think, reading your question (if I understand them).</p> <pre><code>Person() is a base entity. It has ID and Name. PlayerSkill() is a Value Object, that is accessable from Person().PlayerSkill. Contact() is an entity that inherits Person(), so it inherits ID and Name, and has additional Contact properties you want. </code></pre> <p>Now, I just tore up your domain. I know.</p> <p>You can use a hybird approach as well:</p> <pre><code>Person() is a base entity. It has ID and Name. Player() inherits Person(), applies Skill() and other VOs. Contact() inherits Person(), applies Address() and other VOs. </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload