ArchitectMind
  1. Home
  2. Tutorials
  3. Book 7 · Application Architecture & Distributed Systems
  4. Volume III
  5. Domain Complexity
Book 7 · Volume III — Domain-Driven Design & Business Boundaries · Topic 1.3

Domain Complexity

Core, supporting and generic domains

9 min readStage 3 · Systems8 interview questions
Chapter
Chapter 1 — DDD Fundamentals
Prerequisites
Topics 1.1, 1.2
You will be able to
Classify parts of a domain as core, supporting or generic using differentiation and complexity, choose sourcing, modelling depth and team allocation per type, visualise classification on a core domain chart, protect the core from generic concerns, and revisit classification as markets evolve
Covers
Core; Supporting; Generic domain
On this page
  1. 1. Concept / Definition
  2. 2. Why It Exists
  3. 3. Core Concepts
  4. 4. How It Works Internally — Classification Mechanics
  5. 4A. Deep Dive — Treatment and Investment
  6. 5. APIs / Features / Syntax
  7. 6. Practical Examples
  8. 7. Common Problems & Mistakes
  9. 8. Performance & Production Considerations
  10. 9. Architecture & Design Considerations
  11. 10. Interview Questions & Answers

1Concept / Definition

Not all parts of a business are equally important or complex. DDD distinguishes the core domain — where the business differentiates — from supporting and generic domains, so effort and talent go where they create the most value.

Kinds of domain (TOC)
Figure 1 — Kinds of domain (TOC)
TOC typeDefinition
CoreThe part of the domain that provides competitive advantage — complex, differentiating, frequently changing; built in-house with the best people and richest modelling
SupportingSpecific to the business and necessary, but not differentiating; moderate complexity; built simply or outsourced with less rigour
Generic domainCommon problems solved the same way by everyone (identity, payments processing, email, accounting); bought, subscribed to or taken from open source
Table 1 — The three TOC types

2Why It Exists

Teams naturally gravitate to technically interesting problems — building their own auth server, workflow engine or reporting framework — while the differentiating business logic gets less attention. Classifying domains realigns investment with strategy.

Investment usually follows interest or habit rather than value. Engineers enjoy hard technical problems, so they build identity servers and workflow engines; budgets are often spread evenly across systems; and vendors offer packages for almost anything, including the parts that make the company different. Without a classification, nobody can say which of these choices is a mistake. Distinguishing core, supporting and generic domains gives a shared language for those decisions. It tells leaders where the best engineers and domain experts should sit, which areas deserve rich modelling and deep testing, and which should be bought, configured and wrapped. It also exposes risk: a core domain run by a vendor or by an understaffed team is a strategic weakness, even when the code works.

Core vs generic
Figure 2 — Core vs generic

3Core Concepts

3.1 Core

Core domain chart
Figure 3 — Core domain chart
Core characteristicShopNow example
DifferentiatingDynamic pricing & promotions
Complex rulesStacking, margin guards, segments
Frequent changeWeekly campaign mechanics
Needs deep expertisePricing analysts + senior engineers
Table 2 — Recognising the core
JAVA
// Core domain: rich, carefully modelled behaviour
public final class PromotionStack {
    private static final Percentage MAX_TOTAL = Percentage.of(40);
    public Money apply(Money listPrice, List<Promotion> eligible,
                       CustomerSegment segment) {
        Percentage total = eligible.stream()
                .filter(p -> p.targets(segment))
                .map(Promotion::rate)
                .reduce(Percentage.ZERO, Percentage::plus)
                .min(MAX_TOTAL);
        return listPrice.minus(listPrice.times(total));
    }
}

3.2 Supporting

Supporting characteristicExample
Business-specificReturns authorisation workflow
Not differentiatingCustomers don't choose ShopNow for returns forms
Moderate complexityRules, but stable
ApproachSimple layered service or low-code; outsource possible
Table 3 — Recognising supporting domains
JAVA
// Supporting domain: straightforward CRUD + a few rules is fine
@Service
class ReturnRequestService {
    ReturnRequest submit(SubmitReturn cmd) {
        if (cmd.purchaseDate().isBefore(LocalDate.now().minusDays(30)))
            throw new ReturnWindowExpiredException();
        return repository.save(ReturnRequest.from(cmd));
    }
}

3.3 Generic domain

Generic domainBuy/reuse option
Identity & accessKeycloak, Okta, Cognito
Payments processingRazorpay, Stripe, Adyen
NotificationsSES, Twilio
AccountingERP SaaS
Document storageS3 / DMS
Table 4 — Generic domains are solved problems
JAVA
// Generic domain behind an anti-corruption layer
public interface PaymentGateway { PaymentResult authorise(OrderId id, Money amount); }
// vendor model stays outside
class RazorpayPaymentGateway implements PaymentGateway { … }

4How It Works Internally — Classification Mechanics

ShopNow subdomains classified
Figure 4 — ShopNow subdomains classified
Classifying a subdomain
Figure 5 — Classifying a subdomain
QuestionCoreSupportingGeneric
Would customers notice if it were average?YesNoNo
Can we buy it?No (or not well)MaybeYes
How often do rules change?OftenSometimesRarely
Is it specific to our business?YesYesNo
Table 5 — Classification questions

4ADeep Dive — Treatment and Investment

Treatment by domain kind (TOC)
Figure 6 — Treatment by domain kind (TOC)
Where the engineering effort goes (example)
Figure 7 — Where the engineering effort goes (example)
Anti-patternConsequence
Building generic in-house ("our own IdP")Talent drained from core
Outsourcing the coreLoss of differentiation & knowledge
Over-engineering supporting domainsCost without benefit
Letting vendors' models leak into coreCore shaped by generic tools
Table 6 — Investment mistakes

5APIs / Features / Syntax

TypeImplementation style
CoreHexagonal/onion, rich aggregates, property-based tests
SupportingLayered Spring Boot, Spring Data REST, low-code
GenericSaaS/OSS + adapter + ACL
VisualisationCore domain chart, Wardley map
Table 7 — Toolkit

6Practical Examples

6.1 Home-grown identity

A mid-size retailer spent 18 months building its own identity server. After classifying identity as generic, they migrated to a managed IdP and moved four engineers to pricing, which shipped personalised promotions in a quarter.

6.2 Outsourced core

An insurer outsourced its rating engine to a vendor package; competitors launched usage-based products faster. Rating was reclassified as core and rebuilt in-house around the vendor's data feeds.

6.3 Worked example — classification table

SubdomainTypeRationale
Pricing & promotionsCoreMargin & conversion edge
RecommendationsCorePersonalisation edge
OrderingSupportingNecessary, standard-ish
FulfilmentSupportingSpecific warehouse rules
PaymentsGenericPSP does it
IdentityGenericIdP
Table 8 — ShopNow

6.4 Worked example — team allocation

TypeTeam
CoreSenior, stable, co-located with experts
SupportingMixed seniority
GenericIntegration specialists
Table 9 — People follow value

6.5 Worked example — build/buy decision

CriterionPayments
DifferentiationNone
Vendor maturityHigh
DecisionBuy (PSP) + ACL
Table 10 — Generic → buy

6.6 Worked example — core domain chart reading

QuadrantMeaning
High differentiation, high complexityCore — invest
Low differentiation, high complexityGeneric — buy
Low, lowSupporting — keep simple
Table 11 — Using the chart

6.7 Worked example — domain vision statement

CoreStatement
Pricing"Launch any promotion in hours, never below margin floor"
Table 12 — Focus statement

6.8 Worked example — segregated core

StepAction
Extract promotion rules from monolithOwn module, rich model
Table 13 — Distil the core

6.9 Worked example — measuring investment

MetricTarget
% capacity on core> 50%
Table 14 — Track alignment

6.10 Worked example — generic via ACL

Vendor termOur term
payment_intentPaymentAuthorisation
Table 15 — Protect language

6.11 Worked example — supporting done simply

ChoiceEffect
Spring Data REST for store locationsDays not weeks
Table 16 — Right-sized effort

6.12 Worked example — reclassification

YearRecommendations
2022Core
2026Supporting (commodity ML services)
Table 17 — Classification evolves

6.13 Worked example — complexity ≠ core

AreaComplexityType
Tax calculationHighGeneric (buy tax engine)
Table 18 — Complex but not differentiating

6.14 Worked example — quality bars

TypeTest depth
CoreUnit + property + scenario
SupportingIntegration tests
Table 19 — Different rigour

6.15 Worked example — stakeholder conversation

Question to businessPurpose
"Why do customers pick us?"Find the core
Table 20 — Business-led classification

6.16 Worked example — portfolio view

Domain typeCount of services
Core3
Supporting7
Generic (integrations)5
Table 21 — Landscape view

6.17 Worked example — risk of generic customisation

RiskMitigation
Heavy ERP customisationKeep ERP vanilla; custom rules in own context
Table 22 — Don't make generic special

6.18 Worked example — outsourcing supporting

DomainOutsourced?
Store locator app✔ to partner
Table 23 — Acceptable outsourcing

6.19 Worked example — ADR

FieldContent
DecisionBuy IdP; build pricing
RationaleClassification & chart
Table 24 — Documented

6.20 Worked example — core protection

RuleEffect
No vendor SDK imports in pricing domainClean core
Table 25 — ArchUnit rule

6.21 Worked example — interview answer

TypeTreatment
CoreBuild, best people, rich model
SupportingSimple build/outsource
GenericBuy + ACL
Table 26 — Structured answer

7Common Problems & Mistakes

  • Building generic domains in-house.
  • Outsourcing the core.
  • Equating complexity with core.
  • Uniform investment across domains.
  • Technical teams classifying alone.
  • Never revisiting classification.

Most of these mistakes come from classifying by technical interest or complexity instead of by competitive advantage. Building a generic domain in-house, such as an identity server, consumes senior engineers who should be working on pricing or recommendations. Outsourcing the core does the reverse: the company loses the knowledge and speed that make it different, as the insurer in Example 6.2 discovered. Equating complexity with core leads teams to build tax engines that could be bought. Uniform investment gives supporting domains the same rigour as the core, raising cost without benefit. When technical teams classify alone, they miss what customers actually value, and when nobody revisits the classification, yesterday's differentiator keeps absorbing investment after it has become a commodity.

8Performance & Production Considerations

AspectGuideline
ClassificationBusiness-led, documented
InvestmentMajority to core
GenericBuy, wrap with ACL
SupportingSimple, cost-efficient
ReviewAnnually or on strategy change
Table 27 — Operational guidelines

9Architecture & Design Considerations

  • Let differentiation drive classification.
  • Match sourcing, modelling depth and teams to type.
  • Protect the core from generic models.
  • Revisit as markets evolve.

10Interview Questions & Answers

Q1BasicConcept

What is the core domain?

The core domain is the part of the business that gives it competitive advantage, the reason customers choose it over competitors. It is usually complex, changes frequently and depends on deep expertise, and it cannot simply be bought, because a vendor would sell the same capability to everyone. For ShopNow it is dynamic pricing and promotions: stacking rules, margin guards and weekly campaign mechanics. The core deserves the best people, close collaboration with domain experts, rich modelling such as aggregates in a hexagonal structure, and thorough testing. The useful test is not whether it is complex, but whether doing it better than competitors makes the business win; if not, it is not core.

Q2BasicConcept

Give examples of generic domains.

Generic domains are problems every business has and solves in much the same way. Typical examples are identity and access management, payments processing, notifications by email or SMS, accounting, document storage and tax calculation. They are often complex, but they are not differentiating, so mature products exist: Keycloak, Okta or Cognito for identity, Stripe, Razorpay or Adyen for payments, SES or Twilio for messaging, and ERP SaaS for accounting. The right approach is to buy, subscribe or adopt open source, configure the product rather than customise it heavily, and wrap it behind an anti-corruption layer so the vendor's model and terminology do not leak into your core domain.

Q3IntermediateConcept

What distinguishes supporting from generic?

The difference is whether the problem is specific to your business. A supporting domain is necessary and particular to how you operate, but customers do not choose you because of it. ShopNow's returns authorisation workflow and warehouse fulfilment rules are examples: nobody sells them off the shelf exactly as needed, yet they are not a competitive edge. A generic domain is a problem every business shares, such as identity or payments, so products already solve it well. The consequence is sourcing: supporting domains are built simply, using layered Spring Boot, low-code or an outsourcing partner, while generic domains are bought or reused. Neither deserves the investment the core receives.

Q4IntermediateDesign

How should generic domains be integrated?

Buy or reuse a mature product, and integrate it through an anti-corruption layer that keeps its model outside your domain. In practice you define a port in your own language, for example a PaymentGateway interface whose authorise method takes your OrderId and Money, and implement it with an adapter such as RazorpayPaymentGateway that translates to the vendor's API and terms like payment_intent. Domain code depends only on the port, so the vendor can be upgraded or replaced with limited change. Keep the product as close to vanilla as possible, because heavy customisation turns a generic tool into a costly special case. An ArchUnit rule can forbid vendor SDK imports in the core.

Q5Senior EngineerTricky

Is a complex area always core?

No. Complexity and differentiation are separate dimensions, and confusing them is a common and expensive mistake. Tax calculation is a good example: GST or VAT rules are intricate and change regularly, but every retailer must apply them in the same way, and customers never choose a shop because its tax engine is clever. That makes it a generic domain, best handled by a specialist tax engine. On a core domain chart, high complexity with low differentiation falls in the buy quadrant. The opposite also happens: a fairly simple pricing rule can be core if it gives a real market edge. Always ask what makes the business win, not what is hard.

Q6Senior EngineerDesign

How does classification affect design?

Classification decides how much modelling and engineering rigour each part receives. Core domains get rich domain models with aggregates and value objects, a hexagonal or onion structure that keeps business logic free of frameworks, and deep testing including property-based and scenario tests; ShopNow's PromotionStack is an example. Supporting domains can use straightforward layered Spring Boot services, Spring Data REST or even low-code, with integration tests being enough. Generic domains get almost no custom design beyond the adapter and anti-corruption layer around a bought product. Classification also shapes team allocation and boundaries: core teams are senior and stable, and the core is often segregated into its own module or service.

Q7Technical ArchitectConcept

Why reclassify periodically?

Because markets change, and today's differentiator becomes tomorrow's commodity. Product recommendations were core for ShopNow in 2022, but by 2026 managed ML services made good recommendations available to every competitor, so the area became supporting and investment moved elsewhere. New differentiators also appear, as with the insurer whose rating engine became core once usage-based products mattered. If classification is never revisited, the company keeps investing senior talent in areas that no longer win customers and under-invests in emerging ones. A practical rhythm is an annual review with business leaders, plus a review whenever strategy changes, using a core domain chart or Wardley map to show movement.

Q8Solution ArchitectScenario

How would you use classification in a portfolio decision?

I would run a workshop with business leaders and domain experts to list the subdomains and place each on a core domain chart by differentiation and complexity. Then I decide sourcing per type: build the core in-house with the best people, build supporting domains simply or outsource them, and buy generic ones behind anti-corruption layers. Next I compare that with current reality, for example a team maintaining a home-grown identity server, and rebalance capacity towards the core, aiming for more than half of engineering effort there. Each build, buy or outsource decision goes into an ADR with its rationale, and the classification is reviewed annually or whenever strategy changes.

Newsletter

Get new tutorials every week

New ArchitectMind tutorials and interview questions, once a week. No spam, unsubscribe anytime.

Almost done! Check your inbox and click the confirmation link to complete your subscription.
Keep going in Book 7

Application Architecture & Distributed Systems

Volume I · Topic 1.1

Software Architecture

Architecture Fundamentals & Architectural Thinking

Volume I · Topic 1.2

Architecture Responsibilities

Architecture Fundamentals & Architectural Thinking

Volume I · Topic 1.3

Architect vs Developer

Architecture Fundamentals & Architectural Thinking

Volume II · Topic 1.1

Monolith Fundamentals

Application Architecture Styles & Patterns

Volume II · Topic 1.2

Types of Monoliths

Application Architecture Styles & Patterns

Volume II · Topic 1.3

Monolith Advantages

Application Architecture Styles & Patterns

Volume III · Topic 1.1

Domain-Driven Design

Domain-Driven Design & Business Boundaries

Volume III · Topic 1.2

Strategic vs Tactical DDD

Domain-Driven Design & Business Boundaries

Volume IV · Topic 1.1

What Is a Distributed System?

Distributed Systems Fundamentals

Volume IV · Topic 1.2

Why Distributed Systems Exist

Distributed Systems Fundamentals

Volume IV · Topic 1.3

Distributed System Complexity

Distributed Systems Fundamentals

Volume V · Topic 1.1

What Makes a Microservice?

Microservices Architecture

Volume V · Topic 1.2

Service Granularity

Microservices Architecture

Volume V · Topic 1.3

Microservice Boundaries

Microservices Architecture

Volume VI · Topic 1.1

Event Fundamentals

Event-Driven & Asynchronous Architecture

Volume VI · Topic 1.2

Event Types

Event-Driven & Asynchronous Architecture

Volume VI · Topic 1.3

Event-Carried State

Event-Driven & Asynchronous Architecture

Volume VII · Topic 1.1

Scalability

Resilience, Scalability & Distributed Data

Volume VII · Topic 1.2

Stateless Architecture

Resilience, Scalability & Distributed Data

Volume VII · Topic 1.3

Load Balancing

Resilience, Scalability & Distributed Data

Volume VIII · Topic 1.1

ADR

Architecture Decision-Making & System Evolution

Volume VIII · Topic 1.2

Architecture Decision Process

Architecture Decision-Making & System Evolution

Volume VIII · Topic 1.3

Reversible vs Irreversible Decisions

Architecture Decision-Making & System Evolution