11 Evolving Design Decisions
In one sentence: businesses keep changing, so design decisions have to be revisited. Watch for four kinds of change (the domain, the organization, what you know, and growth) and adapt the design when they happen.
When subdomains change type
A subdomain’s type isn’t fixed. Some common shifts, with made-up examples:
| Shift | What it looks like |
|---|---|
| Core → generic | A food-delivery startup built its own route optimizer as a differentiator. Then a vendor starts selling a better one cheaply, so the advantage becomes a commodity anyone can buy. |
| Generic → core | The same company used an off-the-shelf stock planner, but poor forecasts keep causing waste. It decides to build its own demand forecasting, which becomes a new source of advantage. (Large tech companies have done this with their own infrastructure and then sold it as a product.) |
| Supporting → generic | An in-house supplier-contracts screen gets replaced by an open-source tool that does more (search, document scanning). |
| Supporting → core | Simple supporting logic gets steadily smarter because it increases profit or cuts costs. If it grows more complex without that payoff, it’s just accidental complexity. |
| Core → supporting | A “core” feature whose complexity no longer pays for itself gets trimmed back to the minimum. |
| Generic → supporting | Integrating the bought tool turns out to cost more than it’s worth, so the team goes back to a simple in-house version. |
What that means for strategic design
- Integration patterns. Core subdomains need protection: an ACL against messy upstream models, and an OHS so their own frequent changes don’t break consumers. If a subdomain that was handled with separate ways becomes core, duplicating it is no longer acceptable. One team should own it, with customer–supplier links to the others.
- Who builds it. A subdomain that becomes core must come in-house, close to the domain experts. A core subdomain that drops to supporting can be outsourced, freeing the strong teams for what matters.
What that means for tactical design
The main signal is pain: the current design can’t support what the business now needs. New rules keep piling up in a transaction script or active record and every change hurts. Treat that pain as a prompt to reassess both the subdomain and the patterns. Needing to change patterns is normal. You can’t predict the future, and using the heaviest patterns everywhere “just in case” would be wasteful.
Migrating between patterns
If you chose a pattern deliberately and know the alternatives, moving to the next one is manageable.
Transaction script → active record
Both are procedural, so the difference is the data. When working with the data in scripts gets messy, wrap the complex structures in active record objects and stop reaching into the database directly.
Active record → domain model
When the logic around active records gets complex, duplicated or inconsistent:
- Find value objects: structures that can be immutable. Move their related logic into them.
- Make setters private. The code won’t compile anymore, and every error shows a place where outside code changes state. Move that logic into the object as methods.
- Find consistency boundaries: which data really must be strongly consistent together? Those groups become aggregates. Keep them small and refer to other aggregates by ID.
- Choose each aggregate’s root and make the internal objects reachable only through it.
Domain model → event-sourced domain model
Once the aggregates have sound boundaries, model the events of each aggregate’s lifecycle instead of changing state directly. The hard part is existing data, which has no history. Two options:
- Reconstruct plausible past events. Generate a best-guess event stream that projects to the current state, and check it by projecting and comparing. The downside: the history is incomplete (you can’t know how many times something really happened), which undermines why you wanted event sourcing.
- Model a migration event. Start each stream with one explicit “migrated from legacy” event carrying the old state. It’s honest about the missing history, but projections must handle that event type forever.
Organizational change
Team structure changes how contexts should integrate:
- More teams. Since a bounded context has exactly one owning team, a wide context may need to split so each new team gets its own.
- Partnership → customer–supplier. Partnership needs close collaboration. If one side moves to a distant office or time zone, switch to a clearer upstream/downstream relationship.
- Customer–supplier → separate ways. If teams keep fighting over integration (because of distance or politics), at some point duplicating the functionality is cheaper. That’s only acceptable for supporting or generic subdomains.
Domain knowledge
- Domains often look simple at first, then edge cases and rules surface and can force a big remodel.
- Heuristic: when knowledge is thin or the logic keeps changing, keep contexts wide. Split them into narrower contexts (or microservices) once things settle.
- Knowledge can also be lost: documentation goes stale and people leave, until the system becomes “legacy”. Recover it on purpose. EventStorming (Chapter 12) works well for this.
Growth
Growth is healthy, but unmanaged growth turns a codebase into a big ball of mud: features get bolted on without anyone revisiting the original design decisions. The rule is to remove accidental complexity (from outdated decisions) and manage essential complexity (inherent to the business) with DDD tools. Check every kind of boundary again:
- Subdomains. As a subdomain grows, look for finer-grained subdomains inside it, using the “coherent use cases on the same data” test. This matters most for core subdomains: separate out the parts that really differentiate the business.
- Bounded contexts. Watch for contexts that drift into solving unrelated problems (“jack of all trades”) and extract focused ones. Contexts that can’t do anything without calling each other are a sign that the boundaries need redrawing for autonomy.
- Aggregates. New features tend to land in existing aggregates. If an aggregate now holds data that doesn’t need to be strongly consistent with the rest, extract it. That often reveals a hidden model, which may even belong in its own bounded context.
Check yourself
- What integration change does organizational growth often cause?
- Integration moves from conformist to separate ways. What can you infer?
- Signs that a supporting subdomain is turning core?
- Spotting a new business opportunity can cause which type changes?
Answers
- Partnership becomes a customer–supplier relationship (conformist, ACL or OHS).
- The teams struggled to work together, and the duplicated part is supporting or generic, not core.
- The model gets painful to change, and it changes more often.
- Supporting to core, or generic to core.