Pila: the design
Last updated
Stage 4's pieces become one document: Pila's design. You'll write its context, goals and non-goals, describe its containers and data, list its endpoints, record its threats and two decisions, and then check the design against lesson 3.P's requirements, because a design is only finished when every requirement has somewhere to live.
By the end of this lesson you can
- Assemble a design document from diagrams, a data model, endpoints, a threat model and decision records
- Check a design against its requirements, so every story has a home and every non-functional requirement can be met
What you're making
Pila's design document collects the stage's work:
- Context, goals and non-goals (lesson 4.9's format), pointing at the requirements from lesson 3.P.
- Containers, as in lesson 4.4's container diagram.
- Data: entities, attributes, and what isn't stored (lesson 4.5).
- Endpoints with their status codes (lesson 4.6).
- A threat model (lesson 4.7).
- Decision records for the hard-to-change choices (lessons 4.1 and 4.9).
Then the most important check: hold it against the requirements.
Write the design document
Write each part. Most checks tick as you type; compare each part with the team's version. It's kept in this browser and can be downloaded.
- Has goals (not yet)
- Has at least one non-goal (not yet)
- Refers to a requirement from 3.P (a number such as 60, 10 seconds, 30 days) (not yet)
- Names at least three containers (not yet)
- Says how they talk (HTTPS, SQL…) (not yet)
- Names tickets and calls (not yet)
- Says what isn’t stored (not yet)
- At least three endpoints (not yet)
- Status codes beyond 200 (not yet)
- Says how retries are safe (not yet)
- At least three threats (not yet)
- Names STRIDE kinds (not yet)
- At least two ADRs (not yet)
Does every story have a home?
A design is complete when every requirement has somewhere to live. Go through 3.P's stories: where in the design does each one happen? One of them has no home yet.
0 of 6 placed right
A patient gets a number by text
Never more than 60 numbers a day
Counter staff print a number for someone without a phone
Seniors and pregnant women called first, at most two in a row
Names and numbers deleted after 30 days
The waiting-room screen shows who’s being served
Rina does this for every story and every non-functional requirement, with a table: requirement on the left, the parts that meet it on the right. Requirements with an empty right-hand side are design bugs, found while they're cheap. The same table later tells her what to test (lesson 6.5).
Spot the trap: a requirement the design can't meet
To save hosting costs, Marco proposes running Pila on the old computer at the health centre’s counter. “It’s free, and it’s right there.”
What happens if…
Check what you learned
Sources
Every claim on this page comes from these sources: the standard, the founding text of a method, a study, or the official record of a project, from the body that publishes it. Industry reports are labelled as such.
- ISO/IEC/IEEE 42010:2022, Architecture description: an architecture description that addresses each stakeholder’s concerns
- Simon Brown: The C4 model: context and container diagrams
- Michael Nygard, “Documenting Architecture Decisions” (2011): decision records kept with the design
- OWASP: Threat Modeling: a threat model as part of the design