skip to content

Strategic Design

The large-scale half of DDD: shared language, splitting the problem into subdomains, drawing bounded contexts, mapping their relationships, and concentrating effort on the core. This is what makes DDD relevant to architecture rather than just to class design.

part ofSoftware design & architectureoverview, primer and where to startread it →
on this pageshow

questions

page 1 of 2

In Domain-Driven Design, what is a bounded context, and why might the word 'Order' mean something different inside a company's Sales system than inside its Shipping system?

level: juniorimportance: must knowfreq 75%

answer

  1. one model, one boundary
  2. same word, different meaning across contexts
  3. ubiquitous language is local not global
  4. duplication is OK across contexts
  5. boundary != necessarily microservice

basics

~10 s

A bounded context is a boundary around a part of a system where a specific model and its terms have one exact meaning. Outside that boundary, the same word can mean something completely different.

solid answer

~50 s

A bounded context is an explicit boundary - typically a module, service, or subsystem owned by one team - inside which a domain model and its vocabulary (the "ubiquitous language") stay internally consistent and unambiguous. Inside Sales, "Order" might mean a priced, discountable line-item bundle; inside Shipping, "Order" might mean a physical package with weight, dimensions, and a delivery address. Neither is "the real" Order - they're different models for different purposes, and DDD accepts that duplication rather than forcing one shared model to satisfy every concern. The boundary matters because a shared word without a shared context breeds silent misunderstanding: a Shipping field added to Order "because Sales asked" is a symptom of a missing boundary. Contexts usually align with team ownership so each team can evolve its own model's language without cross-team negotiation on every change.

go deeper

for a junior

Should state the core idea in one or two sentences: a boundary where a model's terms mean one specific thing, and different contexts can define the same word differently. Doesn't need context-mapping pattern names.

for a middle

Should connect the boundary to team ownership and be able to give a second concrete example beyond the interview's own, e.g. 'Product' in Catalog vs Pricing.

for a senior

Should explain why forcing one shared model across contexts causes coupling and stalls independent delivery, and mention that translation happens explicitly at the boundary rather than by osmosis.

for a principal

Should discuss how bounded context boundaries interact with organizational structure (Conway's Law) and be able to argue when NOT to introduce a new boundary because the translation overhead would exceed the isolation benefit.

## What a bounded context actually is A bounded context is Domain-Driven Design's answer to a problem every non-trivial software system eventually hits: the same business word means different things to different people, and pretending there's one universal definition creates a model nobody can safely change. Concretely, a bounded context is an **explicit boundary** - conceptual, and usually also a boundary in code (a module, service, or deployable unit) and in team ownership - inside which a specific domain model, along with the vocabulary used to describe it (DDD calls this the '**ubiquitous language**'), is internally consistent and has exactly one meaning. Outside that boundary, the same English word is allowed to mean something else entirely, because it belongs to a different model solving a different problem. ## One word, two models Take 'Order' at a retail company. | Context | The Order it owns | |---|---| | **Sales** | Inside a Sales context, an Order is a shopping-cart-derived object: it has line items, prices, discounts, a payment method, and a status like 'placed' or 'cancelled' - everything needed to answer 'what did the customer agree to buy and pay?'. | | **Shipping** | Inside a Shipping context, an Order (if the term survives the translation at all) means something almost unrelated: a physical parcel with a weight, dimensions, a carrier, a tracking number, and a delivery address - everything needed to answer 'how does this get to the customer's door?'. | A naive design merges these into one 'Order' class with all the fields from both concerns. That model works for a while, but every team's change becomes a landmine for the other team: - Shipping adding an 'estimated delivery date' field might break a Sales report that assumes Order rows never change after checkout. - Sales adding a 'gift wrap' flag has to be threaded through code Shipping never asked for and doesn't care about. This is the concrete failure DDD calls a corrupted or '**polluted**' model, and it's the reason bounded contexts exist: rather than fighting to keep one shared Order model coherent for two unrelated purposes, DDD says let Sales and Shipping each own their own Order concept, fully tailored to their own concern, and treat any translation between the two as an explicit, visible integration step rather than something baked silently into a shared class. ## Why it works Why does this work, mechanically? Because a model doesn't need to be 'true' in some universal sense - it needs to be **useful for the decisions** the people using it are making. A model is a simplification built for a purpose; forcing two different purposes to share one simplification produces a model that serves neither well. By drawing an explicit line and saying 'inside this line, Order means X, and we will never let a Shipping concept sneak in uninvited,' a team gets freedom to evolve their model quickly, because they no longer need cross-team sign-off just to add a field that only they care about. The ubiquitous language - the specific, precise vocabulary the team and its domain experts use in conversation, code, tests, and documentation - is scoped to live inside that same boundary; it is deliberately **not a company-wide glossary**, because a company-wide glossary either becomes so vague it stops being useful, or forces genuinely different concepts into an artificial single definition. ## The trade-off The trade-off is **duplication**: multiple 'Order' concepts now exist across the codebase, and someone unfamiliar with the boundary might initially see this as waste or inconsistency. DDD accepts this cost deliberately, because the alternative - one shared model contorted to satisfy every consumer - produces far worse coupling: - any team's change can silently break any other team's assumptions; - testing the whole thing becomes combinatorial; - nobody can reason locally about what a change will do. The cost of duplicated, boundary-scoped concepts is much cheaper to manage (it's visible, local, and each copy can be simple) than the cost of hidden coupling through one shared '**God model**.' ## How the missing boundary shows up In production, failing to recognize you need a bounded context shows up as a specific pattern: 1. a core entity class or table that keeps growing fields nobody can safely delete; 2. tests that break in one team's suite because of another team's unrelated change; 3. deploys that get delayed because two teams' work landed in the same shared model and now must be reconciled together. Recognizing this early - and drawing the boundary deliberately rather than letting it accrete by accident - is the practical value bounded contexts deliver.

  • If two teams both need to talk about 'the same' Order, how do they communicate without merging their models into one?
    They define an explicit translation at the boundary - typically a small integration layer or an agreed message contract - that maps one context's Order representation to the other's. Each side keeps its own internal model; only the translation code needs to understand both vocabularies. This is often implemented as an Anti-Corruption Layer or a published event schema, so neither team's internal model has to compromise for the other's convenience.
  • Does a bounded context have to correspond to one microservice?
    No - it's a modeling boundary, not a deployment boundary. A single service can house multiple bounded contexts (though that's usually a sign of insufficient separation), and in legacy or monolithic systems one bounded context frequently spans multiple modules or even multiple physical databases. The common convention in modern systems is one service per bounded context, but that's a design choice, not a definitional requirement.
  • What goes wrong if you don't recognize you have two contexts and instead build one shared model?
    You get an ever-growing class or table (often literally called Product or Customer) with fields added by every team for their own purpose, becoming impossible to change safely - any edit risks breaking someone else's meaning. This is the 'big ball of mud' failure mode DDD explicitly names as what bounded contexts prevent.

Think of a bounded context like different departments in a hospital using the word 'chart.' In Nursing, 'chart' means the bedside vitals log updated hourly. In Billing, 'chart' (as in 'chart of accounts') means a ledger structure for invoicing. Same building, same organization, completely different objects called by an overlapping word - and nobody is confused because each department only uses 'chart' inside its own conversations.

saying these in an interview costs you the question

  • says a bounded context is just a database schema
  • claims every system should have exactly one bounded context
  • conflates bounded context with microservice with no caveat
  • thinks duplicating a concept like Order across contexts is a bug to fix by merging models
  • can't explain why the same word can validly mean two different things

context

open as a page

In Domain-Driven Design, what is a context map, and what three things does it typically show about a system made up of multiple bounded contexts?

level: juniorimportance: must knowfreq 70%

basics

~10 s

A context map is a diagram showing all the bounded contexts in a system, how they connect, which one leads (upstream) vs follows (downstream), and which teams own each one.

open as a page

In Domain-Driven Design, what is an Anti-Corruption Layer (ACL), and why would a team put one between their bounded context and an external or legacy system?

level: juniorimportance: must knowfreq 70%

basics

~10 s

An Anti-Corruption Layer is a translation wall between your code and someone else's system, so their messy or different data model doesn't leak into and pollute your own model.

open as a page

In Domain-Driven Design, what is a Domain Vision Statement and why do teams write one when distilling the core domain?

level: juniorimportance: must knowfreq 65%

basics

~10 s

A domain vision statement is a short written description of the core domain, its value, and why it will make the product win — a compass for what's most important to build well.

open as a page

A team runs a workshop where people write things on orange sticky notes in past tense (like 'Order Placed' or 'Payment Failed') and stick them on a long roll of paper in a rough timeline, with all the chairs removed from the room. What is this workshop technique called and what is its core mechanism?

level: juniorimportance: must knowfreq 55%

basics

~20 s

This is Event Storming - a workshop where people from business and tech stand at a wall and write domain events (things that happened) on orange sticky notes in time order, to quickly build a shared picture of how a system or business process really works.

open as a page

In Domain-Driven Design, a company classifies each piece of business functionality into one of three subdomain types: core, supporting, and generic. What distinguishes a core subdomain from a generic one, and why does that distinction matter for where you invest engineering effort?

level: juniorimportance: must knowfreq 75%

basics

~20 s

Core subdomains are the special sauce that makes the business win — you build these yourself and invest your best people. Generic subdomains are things every company needs (like sending email or storing files) that don't set you apart — buy or reuse them instead of building custom.

open as a page

In Domain-Driven Design, what is 'ubiquitous language' and why do teams insist on using the exact same terms in code, conversations, and documentation?

level: juniorimportance: must knowfreq 75%

basics

~20 s

Ubiquitous language is a shared vocabulary that developers and domain experts both use — the same words in code, docs, and conversation — so nothing gets lost or twisted when translating between how the business talks and how the software is built.

open as a page

When you're carving a large, tangled domain model into bounded contexts, what concrete signals ('seams') tell you where one context should end and the next begin?

level: middleimportance: must knowfreq 70%

basics

~20 s

Look for places where the same word is used differently, where one team owns a process end-to-end, or where business rules and data change together but not with the rest. Those cracks show where boundaries naturally sit.

open as a page

When two bounded contexts in a system exchange data — say, an Orders context and a Shipping context — how do you determine which one is upstream and which is downstream, and why does getting that direction right matter for how the two teams should work together?

level: middleimportance: must knowfreq 75%

basics

~20 s

The context whose model the other side has to adapt to is 'upstream' (it leads); the one that changes to fit is 'downstream' (it follows). Getting this right tells you who needs to warn whom before making changes.

open as a page

In DDD's Customer-Supplier context relationship, the downstream team is called the 'customer.' What power does that give them over the upstream 'supplier' team, and how does this differ from a Conformist relationship?

level: middleimportance: must knowfreq 60%

basics

~20 s

In Customer-Supplier, the downstream team has a real say - they can ask the upstream team to build things for them and get prioritized. In Conformist, downstream has no leverage and just accepts whatever upstream provides.

open as a page

How do Open Host Service and Published Language work together when a bounded context needs to serve many downstream consumers, and why is publishing an Open Host Service without a genuine Published Language often not enough?

level: middleimportance: must knowfreq 55%

basics

~20 s

Open Host Service means building one well-documented shared API instead of custom integrations per consumer. Published Language means that API's data format follows a standard, well-documented schema everyone can read - without it, consumers still have to guess.

open as a page

What is the 'Highlighted Core' technique for distilling a domain model, and what problem does it solve when a team can't yet afford to physically restructure the codebase?

level: middleimportance: must knowfreq 55%

basics

~10 s

Highlighted Core means marking which parts of an existing model are the core domain — with a diagram, document, or comments — without moving any code, so everyone can see what matters most.

open as a page

Besides orange sticky notes for domain events, an Event Storming board typically uses several other colors for commands, actors, policies, read models, and external systems. What does each of these represent, and how do they connect to form a coherent flow?

level: middleimportance: must knowfreq 60%

basics

~20 s

Besides orange notes for events, Event Storming boards use other colors for who did something (actors), what they tried to do (commands), automatic rules that react to events (policies), information someone needs to decide (read models), and outside systems involved (external systems).

open as a page

A team is deciding whether to buy a vendor solution or build in-house for a given piece of functionality. How should classifying that functionality as core, supporting, or generic drive the buy-vs-build decision, and what goes wrong when a team gets the mapping backwards?

level: middleimportance: must knowfreq 60%

basics

~20 s

Buy generic stuff (like email sending) because everyone needs it and vendors already solved it well. Build core stuff (your unique selling point) yourself because no vendor sells your competitive advantage. Supporting stuff is usually built in-house too, but kept simple, since it's specific to you but not what makes you special.

open as a page

When a team can't agree whether a piece of functionality is a supporting subdomain or a generic one, what concrete test should they apply, and why does getting this specific distinction right matter more than it might seem?

level: middleimportance: must knowfreq 65%

basics

~20 s

Ask 'is this exactly the same problem every company has, solved the same way?' If yes (like sending SMS), it's generic — buy it. If it's tailored to how this business runs (like a custom discount-eligibility calculator) but doesn't make customers choose you, it's supporting — build it, but don't over-invest.

open as a page

Two teams building an e-commerce platform both use the word 'Order' but mean different things — one team's checkout service treats an Order as a cart snapshot awaiting payment, another team's warehouse-fulfillment service treats an Order as a pick list of physical items. How should the shared domain vocabulary be handled when the same word carries different meanings in different parts of the system?

level: middleimportance: must knowfreq 62%

basics

~20 s

Don't force one meaning of 'Order' everywhere. Let each service keep its own precise definition inside its own boundary, and put a clear translation step where the two services talk to each other, so nobody assumes a word means the same thing on both sides.

open as a page

A Billing bounded context needs data from a legacy Inventory system whose data model uses incompatible concepts (e.g., a single 'SKU status' enum that encodes both stock level and discontinuation). What pattern keeps that legacy model from leaking into and corrupting Billing's own domain model, and how does it work mechanically?

level: seniorimportance: must knowfreq 65%

basics

~20 s

An Anti-Corruption Layer - a translation layer at the boundary that converts the legacy system's data and concepts into Billing's own clean model, so Billing's code never has to understand or depend on the legacy shape directly.

open as a page

A context map shows the technical integration between two bounded contexts, but it's also supposed to capture the relationship between the teams that own them. Why does that organizational dimension matter as much as the technical one, and how does it connect to Conway's Law?

level: seniorimportance: must knowfreq 65%

basics

~20 s

The map shows not just how systems connect but how the teams behind them cooperate or don't. Conway's Law says software tends to mirror the org chart, so tense or siloed team relationships usually show up as messy technical integrations, and vice versa.

open as a page

After a Big Picture Event Storming session, a facilitator looks at clusters of events, actors, and commands on the timeline to propose aggregate boundaries and bounded context boundaries. What specific signals on the board (pivotal events, hotspots, swimlanes) guide that boundary-finding, and what's the risk of getting it wrong at this stage?

level: seniorimportance: must knowfreq 55%

basics

~20 s

On an Event Storming board, clusters of events that a business rule must keep consistent together hint at an aggregate boundary; places where vocabulary or ownership visibly changes, or where people keep disagreeing, hint at a bounded-context boundary.

open as a page

Subdomains describe the problem space and bounded contexts describe the solution space in Domain-Driven Design. When a team maps subdomains onto bounded contexts, should the result usually be a clean one-to-one match, and what goes wrong when teams assume it must be?

level: seniorimportance: must knowfreq 55%

basics

~20 s

Not always. Sometimes one subdomain needs several contexts to build, and sometimes one context handles parts of several subdomains. Assuming it's always a perfect one-to-one match makes teams draw the wrong boundaries and either overload one service or split something that should stay together.

open as a page

A code reviewer notices a class named AccountManager with a method processTransaction(), but in the requirements meeting for the same feature, domain experts kept saying 'wiring a payment' and 'posting to the ledger'. What design smell does this mismatch indicate, and what should the reviewer do about it?

level: seniorimportance: must knowfreq 58%

basics

~20 s

The code's names don't match what the business actually says, which is a warning sign the design has drifted from the real domain. The reviewer should flag it and suggest renaming things to match the real terms, like Ledger.postPayment(), before the mismatch gets baked in further.

open as a page

Six months into a project, domain experts start using a brand-new term, 'Chargeback Hold', that doesn't exist anywhere in the current codebase or vocabulary. Walk through how a team should evolve its shared domain language and the code model together when this happens.

level: seniorimportance: must knowfreq 52%

basics

~20 s

Don't just bolt on a field or flag for the new idea. Go talk to the domain experts about what 'Chargeback Hold' really means and why it matters, then change the code's actual shape — new class, new state, new rules — to represent it properly, and use that exact name everywhere afterward.

open as a page

At the organizational level, what does it mean to 'focus the best talent on the core domain,' and when does extracting an Abstract Core across multiple subdomains become the right strategic move rather than a premature abstraction?

level: principalimportance: must knowfreq 30%

basics

~20 s

It means deliberately assigning your strongest domain modelers to the highest-value core, not spreading talent evenly; an abstract core is a further step where you pull the deepest shared concepts across several related subdomains into one small, careful model everyone else builds on.

open as a page

When a bounded context needs to expose its model to many other consumer contexts at once, not just one partner team, what integration pattern lets it do so without each consumer coupling directly to its internals, and how does it work?

level: middleimportance: should knowfreq 50%

basics

~10 s

The provider context publishes a stable, well-documented public API and/or event schema (a "published language") that many consumers can integrate against, instead of exposing its internal model directly to each one.

open as a page

In practice, how do teams actually produce a context map for a real system — as opposed to a greenfield whiteboard exercise — and what keeps it from going stale once it's created?

level: middleimportance: should knowfreq 55%

basics

~20 s

Teams pull people from every group that owns a piece of the system into a working session, list every real connection between systems by looking at actual code and traffic (not just docs), and agree on direction together. Someone then owns re-checking it periodically, or it goes stale.

open as a page

Event Storming is often run at different 'altitudes' - commonly described as Big Picture, Process Modeling, and Design Level. What distinguishes these three variants, who attends each, and what artifact does each one produce?

level: middleimportance: should knowfreq 45%

basics

~20 s

Event Storming comes in a few 'zoom levels': Big Picture covers the whole business roughly with lots of people, Process Modeling zooms into one process with more detail, and Design Level zooms further into one part of the system with full technical precision.

open as a page

Two teams, Checkout and Fulfillment, need to integrate, and Checkout's team is much larger and moves faster than Fulfillment's. What context-mapping relationship patterns describe the possible power dynamics between two integrating bounded contexts' teams, and how do you choose which one to apply?

level: seniorimportance: should knowfreq 55%

basics

~10 s

DDD names relationship types between two teams' contexts - Customer-Supplier (supplier adapts to consumer), Conformist (consumer just accepts supplier's model), Partnership (co-design together) - chosen by relative priority, trust, and negotiating power.

open as a page

What are the most common ways a context map fails to reflect reality in a mature system, and how do those failures typically surface — as slow rot, or as sudden production incidents?

level: seniorimportance: should knowfreq 50%

basics

~20 s

Maps go wrong when nobody updates them (drift), when they're drawn without the people who really know the integrations (blind spots), or when they're treated as permanently true. This usually shows up quietly for a while, then causes a surprising break during a deploy or incident.

open as a page

Two teams agree to a Shared Kernel - a small, explicitly bounded subset of a domain model and its code, held in common between two bounded contexts. What ongoing coordination cost does this create in practice, and when should a team refuse to enter one?

level: seniorimportance: should knowfreq 40%

basics

~20 s

A Shared Kernel means two teams literally share some of the same code and model. Any change to it needs both teams' agreement, which is slow - it's only worth it when the shared part is small, stable, and genuinely needs to be identical everywhere.

open as a page

What is the Cohesive Mechanisms pattern in DDD core-domain distillation, and how does extracting a computational mechanism differ from extracting a Segregated Core?

level: seniorimportance: should knowfreq 40%

basics

~20 s

A cohesive mechanism is a self-contained algorithm, like a rule engine or route solver, pulled out of the core model into its own component, so the core model can stay about business meaning while the mechanism handles the complex computation.

open as a page

showing 1–30 of 40