02
The boundary model
The boundary model is a light-weight ontology to describe how people and systems interact. It provides agents with a map on how to map and describe behavioural changes.
Main boundary concepts
Section titled “Main boundary concepts”boundary: where aconsumermeets aprovider. Theprovideroffers its resources and capabilities to theconsumeracross it. There is oneboundaryfor eachconsumerandproviderpair.interface: the channel theconsumeruses to see resources and use capabilities, such as a web UI or a CLI.capability: something theconsumercan do with theprovider’s resources, through one or more interfaces, to get a result.resource: something with a state theconsumercares about, such as an order.
- 1
consumer - 2
provider - 3
boundary - 4
interface - 5
capability - 6
resource
An example: the Store
Section titled “An example: the Store”The Store is an invented online shop that sells home goods. Here is how the boundary model describes it, one concept at a time, from the outside in. It starts as a single box: the Store, as the people who use it see it.
Consumers
Section titled “Consumers”Three kinds of people use the Store, each with a boundary of its own:
- Shopper: buys home goods from the Store.
- Fraud analyst: reviews the orders the Store holds as risky, and decides whether each one goes ahead.
- Store manager: keeps the catalog’s products, prices and stock right.
Interfaces
Section titled “Interfaces”Shoppers reach the Store through two interfaces, on one boundary:
- Web shop: the Store’s website, in a browser.
- Mobile app: the Store’s app on their phone, with possibly different features from the web version.
Capabilities
Section titled “Capabilities”Across their boundary, shoppers have four capabilities:
- Browse products: find products, with their price and stock.
- Place order: buy what is in the cart, and get the order back, confirmed or held for review.
- List past orders: see the orders they placed.
- See loyalty balance: see the points they have earned.
Both interfaces sit on the same boundary, but they do not have to offer the same capabilities: only the mobile app offers See loyalty balance.
Resources
Section titled “Resources”The capabilities act on three resources:
- Product: it has a name, a price, a stock and other information. Each is a
propertyof the resource. - Order: links to one or more products, and has a status, a delivery address and other information.
- Loyalty balance: the points a shopper has earned from their orders.
Each capability says how it acts on the resources it touches, in one of four ways:
observes: it shows their state, as List past orders shows the orders.mutates: it changes the state of a resource that already exists. Place order adds points to the loyalty balance, and Refund order marks a charge as refunded.produces: it takes resources as input and makes something new from them, leaving them as they were. That can be a new resource, as Place order creates an order and Charge order creates a charge, or something that is not a resource, such as a PDF of a monthly statement.reacts: it acts when a resource meets a condition, for example sending an alert when a product’s stock runs low.
To tell mutates from produces, look at what is different once the capability has run. If something that was already there has changed, it mutates. If there is something new, made from what it read, it produces.
The link from an order to its products is a relationship between two resources.
Components
Section titled “Components”The Store relies on 2 component that have specific responsibilities and are separated by their own boundary:
- Storefront: keeps the products, the orders and the loyalty points, and decides how many points an order earns.
- Payments: takes the money for each order and gives it back, and decides which payments to hold for review.
Internal boundaries
Section titled “Internal boundaries”When one component relies on another, the same pattern repeats. To charge an order, Storefront relies on Payments. Storefront is the consumer, Payments is the provider, and the charges API is the interface of the internal boundary between them.