Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Lesson 3 of 5 · Concept · 20 min · revision 1

Core, supporting and generic subdomains

Separate the problem space from the solution space, classify subdomains as core, supporting or generic, place them on a core domain chart, and turn the classification into build, buy or outsource decisions without falling into the usual traps.

Contentsand lesson path

What you will learn

  • Classify subdomains as core, supporting or generic and use the classification to decide whether to build, buy or outsource.

01. Why it matters

Hopwell has three developers, one designer and a budget that will not stretch to rebuilding everything well. The EventStorming wall from lesson 2 shows bookings, collection, sorting, routes, deliveries, messages and invoices, and every part has someone who considers it essential. They are right: a courier that cannot send invoices goes out of business as surely as one that loses parcels. But essential is not the same as distinctive. Shops choose Hopwell for one reason, an evening window that is actually kept, and nobody chooses a courier for the quality of its invoicing.

Strategic DDD turns that observation into a decision tool. You split the business into subdomains, decide which ones make the company different, and spend your best people and your most careful design there. Everything else still gets built or bought, but cheaply and safely. This lesson shows how to classify subdomains, how to place them on a chart that business people and engineers can argue about together, and how the classification becomes a build, buy or outsource decision.

02. Domain, subdomains and bounded contexts

Three words need to be kept apart. The domain is the whole area of business activity, here same-day parcel delivery in one city. A subdomain is a part of that activity with its own purpose: taking bookings, sorting parcels, keeping the window promise, charging shops. Subdomains describe the problem space, what the business does, whether or not any software exists. A bounded context, from lesson 1, belongs to the solution space: it is the boundary of a model that a team builds.

Ideally each subdomain is served by one context, but the match is rarely perfect. Hopwell's Planning context relies on route solving, a separate subdomain served by a bought service. Its Billing context holds Hopwell's own charge rules but hands the invoices themselves to an accounting product. Keeping problem and solution apart lets you say precisely where the custom work is.

03. Three kinds of subdomain

Evans named two of the categories, in his 2003 book and again in the DDD Reference. The core domain is the part of the model that is the real business asset, the reason the software is worth building. His advice is to keep it small, put the most skilled people on it and invest in a deep model there. Generic subdomains are the opposite: problems that many businesses have and solve in similar ways. The Reference suggests separating them from the core, giving them lower priority, keeping core developers off them and considering off-the-shelf solutions. Later writers, notably Vaughn Vernon in Implementing Domain-Driven Design (2013), use a third category, which the DDD Crew's Bounded Context Canvas also lists. A supporting subdomain is specific to the business, so no product fits it well, but it is not what customers choose the company for.

For Hopwell, the room agreed on a first classification:

  • Core: window promise planning: the rules that decide which windows to offer each recipient, how much slack an evening needs, what to ask the route solver for, and when to replan an evening that is going wrong.
  • Supporting: booking, hub scanning, the courier app, recipient messaging and the charge rules. Each is shaped by how Hopwell works, but no shop would leave Hopwell because a competitor did them differently.
  • Generic: route solving (the mathematics of ordering stops under time windows, for which mature solvers exist), invoicing and accounting, and sending SMS messages.

The classification belongs to Hopwell, not to the subdomain. Route solving is generic here because Hopwell wins on its promise rules, not on the algorithm, and a good solver can be bought. For a company that sells routing software, or wins on the algorithm itself, the same subdomain would be core.

04. A core domain chart for Hopwell

Classifying by gut feeling invites arguments that nobody can settle. The core domain chart, popularised by Nick Tune and published by the DDD Crew, gives the argument a shape. Each subdomain gets two scores: business differentiation, meaning how much advantage it gives and how hard it would be for a competitor to match, and model complexity, meaning how hard the rules are to discover, design and keep correct. The DDD Crew is honest about these scores: they are subjective bets on the future, and the main value is the conversation, with product people judging differentiation and engineers judging complexity.

Hopwell scored its subdomains from 1 to 5 in a 30-minute follow-up meeting. The script below plots them as text and flags any label that disagrees with the room's own scores. It uses only the standard library.

Python · core_chart.py
"""Draw Hopwell's subdomains on a core domain chart and flag labels that disagree.

Scores are the room's judgement from 1 (low) to 5 (high), not measurements.
"""
SUBDOMAINS = [  # name, business differentiation, model complexity, agreed label
    ("Window promise planning", 5, 5, "core"),
    ("Route solving", 1, 4, "generic"),
    ("Booking", 2, 2, "supporting"),
    ("Hub scanning", 2, 3, "supporting"),
    ("Courier app", 3, 3, "supporting"),
    ("Recipient messaging", 2, 1, "supporting"),
    ("Charge rules", 2, 2, "supporting"),
    ("Invoicing", 1, 3, "generic"),
    ("SMS sending", 1, 1, "generic"),
    ("Live tracking map", 4, 2, "generic"),
]
DEFAULTS = {
    "core": "build in-house with the strongest team; model it deeply",
    "supporting": "build simply, or outsource with a clear spec",
    "generic": "buy or adopt open source; integrate behind a translation layer",
}

grid = {}
for number, (name, diff, cplx, label) in enumerate(SUBDOMAINS, start=1):
    grid.setdefault((diff, cplx), []).append(str(number))
print("model complexity")
for cplx in range(5, 0, -1):
    cells = [",".join(grid.get((diff, cplx), [])) for diff in range(1, 6)]
    print((f"  {cplx} |" + "".join(f"{cell:^8}" for cell in cells)).rstrip())
print("    +" + "-" * 40)
print("     " + "".join(f"{diff:^8}" for diff in range(1, 6)) + "differentiation\n")

for label, advice in DEFAULTS.items():
    print(f"{label:<12}{advice}")
print()
for number, (name, diff, cplx, label) in enumerate(SUBDOMAINS, start=1):
    print(f"{number:>2} {name:<25}{label}")
    if label == "core" and diff < 4:
        print(f"   check: labelled core, but differentiation is only {diff}")
    if label != "core" and diff >= 4:
        print(f"   check: differentiation {diff}, labelled {label}. "
              "Re-score or relabel?")
Terminal
python3 core_chart.py
Expected output
model complexity
  5 |                                   1
  4 |   2
  3 |   8       4       5
  2 |          3,7              10
  1 |   9       6
    +----------------------------------------
        1       2       3       4       5    differentiation

core        build in-house with the strongest team; model it deeply
supporting  build simply, or outsource with a clear spec
generic     buy or adopt open source; integrate behind a translation layer

 1 Window promise planning  core
 2 Route solving            generic
 3 Booking                  supporting
 4 Hub scanning             supporting
 5 Courier app              supporting
 6 Recipient messaging      supporting
 7 Charge rules             supporting
 8 Invoicing                generic
 9 SMS sending              generic
10 Live tracking map        generic
   check: differentiation 4, labelled generic. Re-score or relabel?

Read the chart by region. Number 1, window promise planning, sits alone at the top right: highly differentiating and hard to get right, the shape of a core domain. Generic subdomains sit on the left at any height; route solving (2) is complex but does not differentiate Hopwell, which is exactly why buying it makes sense. The supporting subdomains cluster at low differentiation and modest complexity.

The script also flagged number 10. The live tracking map was Hopwell's pride in its first year, when no other local courier offered one, and the team that built it still scored it 4 for differentiation. Yet the room had labelled it generic, because every rival now has one and courier-app vendors include it as standard. The mismatch is the useful output: either the score or the label is out of date. Here the score was stale. Classifications drift as markets change, so revisit them when the market moves, for example during yearly planning, and expect some core work to become generic over time.

05. From classification to build, buy or outsource

The classification sets a default for each subdomain. A default is the starting point of a decision, not the decision itself:

  • Core: build in-house, with the strongest people, and keep the learning inside. This is where the deeper modelling of tactical DDD pays off. Outsourcing the core means paying someone else to learn the thing that makes you different.
  • Supporting: build simply, or outsource with a clear specification and acceptance tests. Plain designs such as a transaction script or a basic CRUD application are often enough. Do not let it absorb your best people.
  • Generic: buy a product or adopt open source, and integrate it through a translation layer so that the product's vocabulary stays out of your model; lesson 4 calls this an anticorruption layer. Building a generic subdomain yourself is justified mainly when nothing available meets a hard constraint, such as a legal requirement, and even then keep it small and separate.

Three traps catch most teams:

  1. Difficulty is not differentiation. Engineers tend to rate the hardest code as the most important. Hopwell's ageing hub scanners need awkward driver code, but no shop chooses a courier for its scanner integration. Complexity tells you how carefully to build something; differentiation tells you whether it deserves your best people.
  2. Visibility is not differentiation. Invoices and tracking pages are seen by every customer, so they feel strategic. Customers expect them to work, but they do not choose a courier because of them.
  3. One subdomain can hide two. Billing looked like one area until the group separated Hopwell's own charge rules, such as free delivery after a missed window, from producing invoices and taking payments. The decision was to buy accounting software and build only the charge rules. When an area seems to need both a product and custom code, look for the seam between them.

Write the outcome down. A short decision record per subdomain, with the classification, the scores and what would change the decision, keeps the reasoning visible to the next team (see architecture decision records).

06. Check your understanding

Practice check · 3 questions

Classifying and sourcing subdomains

Each question has one best answer.

Q1. Hopwell's developers say the hardest code they own is the importer for the fourteen spreadsheet formats that shops use to upload bookings. The founder says shops choose Hopwell because evening windows are kept. Which is the core subdomain?
Q2. In 2020 Hopwell was the only courier in its city to offer photo proof of delivery, and it built the feature itself. Today most rivals offer it, and two off-the-shelf courier apps include it out of the box. The team that owns it asks for two more engineers to rebuild it. What does the classification suggest?
Q3. Support wants a custom-built helpdesk, arguing that Hopwell's tickets are special. Looking closer, the only Hopwell-specific part is deciding which complaints earn a credit under the window promise. What does strategic DDD suggest?
Practice only: not graded, not saved, not evidence.

07. Apply it

Use your clinic EventStorming board from lesson 2. List six to ten subdomains, score each one for differentiation and complexity with at least one business person and one engineer, and replace SUBDOMAINS in core_chart.py with your list. Resolve every check: line by re-scoring or relabelling, and write two sentences on why. Then write a one-page decision record for one subdomain you would buy, naming what would make you build it instead.

08. Review prompt

Without looking back:

  1. What is the difference between a subdomain and a bounded context? Give a Hopwell example where they do not line up one to one.
  2. Describe core, supporting and generic subdomains, and the default sourcing choice for each.
  3. What do the two axes of a core domain chart measure, and who should judge each one?
  4. Why can the same subdomain be core for one company and generic for another?
  5. Name the three traps from this lesson, with one example of each.

References

Your progress

Reading state

Sign in to save that you finished reading this lesson.

Sign in to mark reading complete

Prove this skill

6 questions · about 5 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.
Take the skill check