Bounded Context Canvas
Escrito por Darjus Kazakevic · revisado el
One page that turns a bubble on a whiteboard into a context a team owns.
A context map shows bubbles and lines. It does not say what a bubble is for, what it promises, or what it assumed when it was drawn. The Bounded Context Canvas, from Nick Tune and the DDD Crew community, answers those questions on one page per context.
You fill it in as a team, usually after event storming has suggested the boundaries. Its most useful box is the one people skip: assumptions. That is where the thing that later proves wrong is often already written.
En esencia — Describe each context on one page (purpose, type, messages in and out, key words, assumptions) so the team can review it instead of assuming it.
Cuándo recurrir a él
Recurre a él cuando
- A context map exists, but nobody can say what a bubble promises
- A team takes ownership of a context and needs its edges in writing
- Reviewing a proposed boundary before building a service around it
Reconsidéralo cuando
- Before the boundary is found: run discovery first
- As paperwork filled in once and never reviewed
- A tiny system with one or two obvious contexts
The main boxes
- Purpose and classification
- Why the context exists, in one or two sentences, and its type: core, supporting or generic, built or bought. This links the canvas to the subdomain analysis.
- Inbound and outbound messages
- The commands, queries and events the context receives and sends, with the other context for each one. This is its contract with the rest of the system.
- Ubiquitous language
- The key terms and what they mean in this context. Also list the words this context avoids, because a neighbour uses them for something else.
- Assumptions and open questions
- What the team believes but has not checked, each with a date. These are the first things to check when the model starts to hurt.
Reglas de diseño
- Fill in the assumptions box, then review it
- The assumptions box is where the thing that later proves wrong is usually already written. Date each one and review them every quarter, so a review finds it instead of a bug.
- List the words the context does not use
- Next to its own terms, name the neighbours' words it avoids, like Sales's “order” in Shipping. The language box is where clashes between contexts show up first.
- Fill it in together, after discovery
- Write the canvas as a team, after event storming or storytelling has suggested the boundary. One architect filling it in alone produces a document nobody owns.
Errores habituales
- Filled in by one architect alone, so the team never owns it
- The assumptions box left empty, though it is the most useful part
- Message lists that differ from what the code really sends