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 ...

Get Domain Modeling Made Functional now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.