advanced

Bounded contexts

Draw language and model boundaries where the same words, rules, and ownership differ across business capabilities.

Bounded contexts delimit where a particular domain model and ubiquitous language apply. The same word—customer, product, shipment—may mean different things in sales versus fulfillment. Context maps document relationships: shared kernel, customer-supplier, anti-corruption layer, open-host service.

On interviews: draw two contexts and their integration. Explain anti-corruption layer when legacy semantics differ from new core.

Common pitfalls: one giant model for the whole company; implicit context merges via shared database; integration without translated contracts.

The trade-off is flexibility versus complexity—know when the simpler path is enough.

Checklist:

  • Context boundaries align with team ownership.
  • Glossaries differ per context where needed.
  • Integration uses explicit translation layers.
  • Context map updated when relationships change.