Open dmdashenkov opened 6 years ago
The suggested approach is to produce strict rules on what a bounded context is at compile time.
This can be done by introducing module annotation @BoundedContext
and consider this module to contain the definition of the bounded context.
Currently,
Model
is a system-wide singleton. The problem with this is revealed when trying to add more complex validation, e.g. find the correspondence between commands and bounded contexts.In order to make
Model
agiler, and also prohibit inadequate access to theModel
instances, we should turn it into a per-BC concept.