title: Can Core Domain span multiple Bounded Contexts?
body: <p>1)</p>
  
  <p>Evan's book, pg. 415:</p>
  
  <blockquote>
    <p>Also, the critical aspects of the domain model may span multiple
    Bounded Contexts, but by definition these distinct models can't be
    structured to show their common focus.</p>
  </blockquote>
  
  <p>a) I assume the quote is implying that <em>Core Domain</em> <strong>CD</strong> can span <em>several Bounded Contexts</em> <strong>BCs</strong>?</p>
  
  <p>b) I assume <strong>BCs</strong> within <strong>CD</strong> should only contain <em>core elements</em>, but no <em>generic elements</em>? If so, doesn't that mean we should always design <strong>BCs</strong> ( those contained by <strong>CD</strong> ) with <em>Core Domain in mind</em>? In other words, we should have some general idea what <strong>CD</strong> is even before we begin designing <strong>BCs</strong>?</p>
  
  <p>c) </p>
  
  <blockquote>
    <p>... but by definition these distinct models can't be structured to
    show their common focus</p>
  </blockquote>
  
  <p>I realize that <strong>BCs</strong> shouldn't be structured such that outside world would be able to immediately figure out how all the parts ( ie <strong>BCs</strong> ) fit together and what their common purpose is, but is author implying that such a structure ( which would implicitly convey the common purpose of  different <strong>BCs</strong> ) couldn't happen even by accident? If so, why?</p>
  
  <p>2) <em>Domain Model</em> may have several <em>Generic Subdomains</em> <strong>GSs</strong> , but can a single <strong>GS</strong> span <em>multiple</em> <strong>BCs</strong>?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>1) </p>
  
  <p>b) </p>
  
  <blockquote>
    <blockquote>
      <p>I assume BCs within CD should only contain core elements, but no
      generic elements? ...</p>
    </blockquote>
    
    <p>One should certainly have an idea of what the core domain is when
    defining BCs. As stated, ideally, they should be one-one. However, a
    BC may be defined to fulfill needs of of a system in a non-ideal
    state.</p>
  </blockquote>
  
  <p>I assume you're implying that in non-ideal situation <strong>BC</strong> within <strong>CD</strong> may also contain some <em>non-core elements</em> and also in non-ideal situation <strong>CD</strong> may contain <em>more than one</em> <strong>BC</strong>?</p>
  
  <p>c) </p>
  
  <blockquote>
    <p>A domain spans multiple BCs but despite explicit boundaries, domain
    behavior can certainly span BCs. A context map can describe such
    cross-BC interactions. The quote itself is based around the idea of a
    domain vision statement the purpose of which is to highlight the value
    of the core domain and possibly explain the relationship to BCs.</p>
  </blockquote>
  
  <p>But why is author using the term "<em>by definition</em>", as if to imply there is no way that <strong>BCs</strong> could accidentally also be structured such that they would show their <em>common focus</em>?</p>
  
  <p>2) </p>
  
  <blockquote>
    <blockquote>
      <p>Domain Model may have several Generic Subdomains GSs , but can a
      single GS span multiple BCs?</p>
    </blockquote>
    
    <p>Multiple <strong>BCs</strong> can make use of a single generic sub-domain. I would
    avoid the term "spans" here because that overemphasizes the importance
    of the generic sub-domain for the entire domain model.</p>
  </blockquote>
  
  <p>a) </p>
  
  <blockquote>
    <p>Multiple BCs can make use of a single generic sub-domain</p>
  </blockquote>
  
  <p>Not sure I understand your reply. Are you saying that a <em>single</em> <strong>GS</strong> can contain <em>multiple</em> *BCs*?</p>
  
  <p>b) </p>
  
  <blockquote>
    <p>I would avoid the term "spans" here because that overemphasizes the
    importance of the generic sub-domain for the entire domain model.</p>
  </blockquote>
  
  <p>Perhaps a useless question, but could you elaborate on why using the term "<em>span</em>" would make <em>Generic Subdomain</em> appear more important than it actually is? </p>
  
  <p><strong>REPLYING TO Giacomo Tesio:</strong></p>
  
  <p>1)</p>
  
  <p>b) </p>
  
  <blockquote>
    <p>No, some generic elements often play a key role in the Core Domain.
    See for example Time, Currency and Money that are present in many
    Shared Kernel: they are really generic but important to the Core
    Domain rules.</p>
  </blockquote>
  
  <p>So if generic element ( such as Time, Currency and Money ) is <strong>also</strong> used by <em>Core Domain</em>, then only implementation option is <em>Shared Kernel</em> ( ie this <em>generic element</em> is shared by both <em>Core Domain</em> and any other <em>subdomain</em>(s) that needs it ), but if <em>generic element</em> is used <strong>only</strong> by <em>Core Domain</em>, then we shouldn't bother with <em>Shared Kernel</em>, but should instead define <em>this generic element</em> directly within <em>Core Domain</em> ? </p>
  
  <p>1)</p>
  
  <blockquote>
    <p>c) Context boundaries are defined after term's semantics. In a BC, no
    term should mean more than one thing (see SRP). When you see that a
    class has more than one meaning in the domain expert's mind, you know
    that you have mixed differnt BC.</p>
  </blockquote>
  
  <p>Could you expand on your answer a bit, since I fail to understand how your answer relates to my question?</p>
  
  <p><strong>SECOND UPDATE:</strong></p>
  
  <p>1)</p>
  
  <p>b) </p>
  
  <blockquote>
    <p>It may also be that a single BC contains multiple sub-domains. This is
    usually not ideal because it likely indicates a conflated BC.</p>
  </blockquote>
  
  <p>When reading the book, I haven't pay much attention to author's usage of the term "<em>subdomain</em>", but I'm pretty certain that the book doesn't offer a thorough definition of what a <em>subdomain</em> is. So what exactly is considered a <em>subdomain</em>? Just a bunch of <em>logically related domain concepts</em>? If yes, then I assume a <em>subdomain</em> should never span several <strong>BCs</strong>? </p>
  
  <p>2)</p>
  
  <p>a) </p>
  
  <blockquote>
    <p>A signle GS can be used by multiple BCs. This is so because the
    sub-domain is generic. So the GS doesn't contain the BCs; instead, it
    is referenced by the BCs.</p>
  </blockquote>
  
  <p>From your reply it seems you're implying that <em>Generic Subdomains</em> are never implemented as <strong>BCs</strong>? Why not, since in my opinion different <em>Generic Subdomains</em> may contain <em>distinct models</em> and <strong>BCs</strong> seem ideal solution to separate those <em>generic models</em>?! </p>
  
  <p>3)
  Could you also help me with the following question, since it's confusing me quite a bit:  if generic element ( such as Time, Currency and Money ) is <strong>also</strong> used by <em>Core Domain</em>, then only implementation option is <em>Shared Kernel</em> ( ie this <em>generic element</em> is shared by both <em>Core Domain</em> and any other <em>subdomain</em>(s) that needs it ), but if <em>generic element</em> is used <strong>only</strong> by <em>Core Domain</em>, then we shouldn't bother with <em>Shared Kernel</em>, but should instead define <em>this generic element</em> directly within <em>Core Domain</em> ? </p>
  
  <p>thank you</p>