Domain Capability
A Domain Capability is one thing the domain can do.
It is either a decision the domain makes or a question the domain answers.
The domain is built from capabilities. It is not built from a shared object model. Each capability owns the rules of its decision and the facts the decision reads.
[ Domain Request ] → ( one Domain Capability ) → [ Domain Response ]
What a Capability Owns
A capability owns:
- the business responsibility it fulfills
- the rules that govern it
- the outcomes it can produce
A capability does not own the individual decision.
The decision is made for each request, by applying the rules to the facts that hold at that moment.
The same capability can produce different outcomes for the same request when the facts differ.
Command or Query
A capability is a command capability or a query capability.
A command decides and may change the domain. A query answers a question and returns a result.
Commands and queries stay separate.
What, Not How
A capability describes what the domain does.
It does not describe how the request is delivered, how the work is coordinated, or how the facts are stored.
The processes and technology that implement a capability change more often than the capability itself. Naming the capability captures the part that stays stable.
Autonomy
A capability is autonomous.
It does not depend on another capability.
It does not call another capability.
It projects the facts its decision needs into its own context, instead of working on a model shared with other capabilities.
Capabilities share the Application State they read and write. They do not share a mutable object model.
This keeps a change to one capability from reaching into another.
Not a Delivery Mechanism, Not a User Interaction
A capability is not a Delivery Mechanism.
The same capability can be reached over HTTP, a message, or a command line. The delivery mechanism translates the outside request. The capability makes the decision.
A capability is not a User Interaction.
A user interaction is an outside-facing process that may use one capability or several. A capability is one internal unit that an interaction can use.
Relationship to RPUs
A Request Processing Unit implements exactly one Domain Capability.
The capability is the responsibility. The RPU is the code that carries it, from request to response.
Summary
A Domain Capability is:
- one thing the domain can do
- a command capability or a query capability
- the owner of its rules and possible outcomes, while each decision is made per request
- autonomous and independent of other capabilities
- described by what the domain does, not how it is delivered or stored
- implemented by exactly one RPU