Skip to the guide

From user flows to endpoints

BeginnerConcept3 pages

In a product round most of the setup goes on the API, and the way to write it is to walk what the user does, screen by screen. Step 3: Core entities and the API is the four-minute version, and Designing a REST API teaches the methods and status codes.

Packing for a day trip

A guide planning a bus tour walks through the day before it starts: the museum at ten, lunch by the lake at one, the boat at three. For each stop she packs one bag with everything it needs, so nobody runs back to the bus for a ticket. The office kitchen makes the same packed lunch for every traveller in one go, early in the morning. Each lunch still gets a label with the traveller's name and allergies, taken from the booking list, because those differ from person to person.

The guide walking through the day is you, walking a user flow before you draw, and each stop is a screen. The bag for a stop is the one call that screen makes, and running back to the bus is a chatty screen fetching piece by piece. The tour office that packs the bags and makes the lunches is your server. The lunches made in bulk are the data every viewer shares, cached once. The name labels are the fields that differ per viewer, looked up in that viewer's own records.