Skip to content

Task-Centric Page

Status: Composition — no new primitive needed

A screen designed around a task, not an entity.

“Edit order” forces the user to know which fields to touch and in what order. “Confirm shipment” presents exactly what is needed for that specific job. The former exposes everything; the latter exposes only what the task requires.

Entity-centricTask-centric
Shows all fields of the entityShows only fields relevant to this task
Generic “Save” actionNamed action that completes the work
User decides what to changeScreen guides the user to the outcome
One screen for all operationsOne screen per distinct workflow step

Define a view class that exposes only the fields relevant to the task, plus the actions that complete it. There is no new annotation — this is the Workflow over screens principle applied at design time.

// Entity-centric (avoid for complex tasks)
@UI("/orders/{id}/edit")
public class EditOrder {
private String ref;
private LocalDate date;
private String customerId;
private List<OrderLine> lines;
private String notes;
private String internalCode;
// ... many more fields
public void save() { ... }
}
// Task-centric (preferred)
@UI("/orders/{id}/confirm-shipment")
public class ConfirmShipment {
private LocalDate shippedDate;
private String trackingNumber;
private ShippingCarrier carrier;
@MainAction
@Action(validationRequired = true)
public ConfirmationReceipt confirm() { ... }
@Action(confirmationRequired = true)
public OrderDetail cancel() { ... }
}

Destructive or irreversible actions carry @Action(confirmationRequired = true).

Confirm shipment — Order #4521
Shipped date [2024-03-15]
Carrier [DHL ▼]
Tracking [1Z999AA10123456784]
[Cancel] [Confirm shipment →]
  • Workflow over screens — the screen exists to complete a job
  • Progressive complexity — irrelevant fields stay hidden
  • Recoverability — confirmation gate on destructive paths