<blockquote>
<p>Is the relationship between the two is containment relationship, i.e.
Bounded-Context has one or more models?</p>
</blockquote>
<p>我想你可以这样说,但是有界上下文(BC)只有一个模型,对象的命名是根据BC的泛在语言(UL)来命名的。你知道吗</p>
<p>模型和BCs都属于解空间。你知道吗</p>
<p>在问题空间中有域和子域。你知道吗</p>
<p>在解决方案空间中有BCs(理想情况下与子域相关的比例为1:1)。你为子域建模,每个子域模型都有一个BC。你知道吗</p>
<p>但例如,您可以只使用一个模型对整个域进行建模,这样您就可以在整个域的解决方案空间中只使用一个BC。在本例中,一个BC与多个子域相关。这个BC将是一个单片应用程序。你知道吗</p>
<p>另一个例子是,当您将子域拆分为几个“部分”并对每个“部分”进行建模时,就会出现与许多bc相关的子域。所以你会有很多子域的模型。这样,在解空间中就有许多用于子域的bc,即许多用于解决子域问题的应用程序。你知道吗</p>
<p>当根据UL术语进行的划分是模糊的时,子域和bc之间出现1:N或N:1关系的情况。你知道吗</p>
<blockquote>
<p>As I understand DDD concepts should be identifiable (to some degree)
through the codebase, this is clear for Aggregate, Entities, Event,
Commands...etc, but how Models and Bounded-Context are mapped into the
codebase? for example is a models just a set of one or more
aggregates, or something else? is Bounded-context a namespace or
something else?</p>
</blockquote>
<p>BC是一个软件系统,一个自治的应用程序。模型是BC的源代码。但是在DDD中存在另一个概念:模块,一组内聚的域对象。它比BCs更薄。你知道吗</p>
<p>因此,从宽到小:</p>
<p>解决方案>;业务连续性>;模块>;聚合>;实体和价值对象</p>