Design · lesson 10 of 10
Ideas in this lesson
AContext and containersfrom lesson 4.4
BData and APIfrom lessons 4.5 and 4.6
CThreat modelfrom lesson 4.7
DADRfrom lesson 4.9

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.

Pila: design documentKept in this browser only
  • 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)
Write each part until its checks pass.

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

  1. A patient gets a number by text

  2. Never more than 60 numbers a day

  3. Counter staff print a number for someone without a phone

  4. Seniors and pregnant women called first, at most two in a row

  5. Names and numbers deleted after 30 days

  6. 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

Spot the trapMarco

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

The design has no part that deletes phone numbers after 30 days. When is the cheapest time to find that?
Why should a design document point at the requirements?

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.

All sources for Simple Software Development