Contracts Between Bounded Contexts
We want to reduce coupling between bounded contexts as much as possible, but a shared communication format always induces some coupling: the events and related DTOs form a kind of contract between bounded contexts. The two contexts will need to agree on a common format for them in order for communication to be successful.
So who gets to decide the contract? There are various relationships between the contexts, and the DDD community has developed some terms for the common ones:
-
A Shared Kernel relationship is where two contexts share some common domain design, so the teams involved must collaborate. In our domain, for example, we might say that the order-taking and shipping contexts must use the same design ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access