Complexity
Technical complexity arises from rules and concepts of the problem. Technical complexity arises through mechanisms, dependencies and operating models of the solution.
- Domain-levelComes from rules of business.
- TechnicalComes from the chosen solution.
- PriceEvery situation costs test and operation.
Context
Why this is important
Not every difficulty belongs to business. Every technical situation must be tested, observed and operated; anyone who considers it unavoidable pays this price without need. The conscious limitation deals with building block simplicity.
This building block explains the origin and effect of complexity. For the deliberate limitation of additional mechanisms, see Simplicity and Complexity Budget.
What can I do with order B-1042 Everything is happening?
Discount rules and reservation periods are part of the shop business. Every technical decision adds situations that the business did not demand. Turn it on and see how the order B-1042 It becomes more complex.
This is how you read the picture
- Domain-level The green tiles, such as “reservation expired” – they always remain.
- Technical The orange tiles that only appear with a decision.
- Price The counter: from 5 up to 13 Situations.
5 Situations which: Order B-1042 control must be: Make a technical decision on this.
- Domain-levelOpenOrder is created, payment is pending.
- Domain-levelbezahltPayment is confirmed.
- Domain-levelshippedThe show is on its way.
- Domain-levelReservation expiredThe deadline for the stock has passed.
- Domain-levelVoucher does not applyThe discount rule excludes a product.
Benefits & limitations
Helps if:
- Changes regularly affect a surprising number of building blocks or teams.
- A design introduces new layers, services or coordination mechanisms and requires a cost-benefit assessment.
Boundaries
- Domain scenarios remain relevant in every design; a compact structure must keep them visible. Check them against the Functional Requirements.
- Additional technical scenarios have a cost that must be justified by demonstrated benefits; see Simplicity.
- The number of situations is an indication, not a measure; coupling shows how changes spread along the paths.
In practice
- Identify interactions. Record states, dependencies and coordination for a relevant flow. The result makes visible where delays, common changes or error consequences arise.
- Identify the source of complexity. Separate business rules from decisions introduced by technology or organisation. Consider Coupling when a change propagates across many building blocks.
- Weigh additional mechanisms against their benefits. Identify the specific benefit and ongoing operational and change costs of each addition. Simplicity helps align a design with demonstrated needs.
Read the detailed explanation
Domain complexity arises from the rules, states and exceptions of the problem domain. Technical complexity comes from additional dependencies, distribution, abstractions and operational mechanisms. Architecture can organise necessary distinctions visibly and limit interactions introduced by the design itself. Simplicity considers the appropriate scope of a design; Coupling describes an important source of technical dependencies.
The effort needed to understand a system depends on how easily a team can find rules, trace changes and isolate faults. Code size and the number of building blocks provide useful indicators when considered alongside these working practices. Each additional mechanism needs a clear benefit, an owner responsible for maintenance and a way to verify its effects.
Fred Brooks calls the complexity inherent in the problem essential complexity and the complexity introduced by the chosen solution accidental complexity.
Check your understanding
Test yourself in three stages
ReadingCheck in the picture
Which situations are added by “creating an asynchronous account”?
View the solution with justification
“Invoice is still missing” and “Invoice order duplicately served”. Both arise only through the asynchronous creation, not through the business.
ApplyingTransferred to a new situation
The shop introduces partial deliveries: an order can come in two packages. Green or orange tile?
View the solution with justification
Green. Partial delivery is a business rule and remains, whether the shop is built as a monolith or with services. It belongs in the technical model.
EvaluateWeighing an alternative
Is it worthwhile to operate shipping as your own service, even though three new situations arise?
View the solution with justification
Only with a proven need, for example, if your own team has to independently publish and scale the shipment. Without this benefit, the shop pays three additional error pictures for nothing.
Explore further
These building blocks continue the thoughts of this page.
References
- Google SRE · Simplicity (opens in new tab)Explains operational costs of complexity and clear system design.
- Martin Fowler · YAGNI (opens in new tab)Explains the cost of precautionary built-in functions and abstractions.
- Martin Fowler · Bounded Context (opens in new tab)Explains model boundaries and relationships between different specialist models.