Output
An Output definition is concerned with providing information to the user without regard to the form of that information when presented to the user. To make this more tangible, an Output could be implemented as any of the following:
- the text shown on a web page or mobile application
- the display of an interactive graphic, chart, etc.
- the presentation of a video or audio recording
- haptic, olfactory or gustatory feedback
- any other way in which a human can receive information from a machine.
The nature of the implementation for an output is up to the UI Designer. RIDDL's concept of it is based on the net result: the data type received by the user.
An Output is a named component of an application that sends data of a specific type from the application to its user. Each output can define data types and declares a result message as the data sent to the user.
Syntax¶
An output is written as an alias, an identifier, a presentation verb, and what it presents:
document Receipt shows record ReceiptData
list CartLines displays record CartLine
picture Avatar presents type ImageRef
Aliases: output, document, list, table, graph, animation,
picture, sound, speech, haptic
Presentation verbs: presents, shows, displays, writes, emits,
plays (sound and animation), speaks and announces (speech),
vibrates, pulses and nudges (haptics), diffuses (scent), and
serve, offer and taste
Writing to an Output¶
A handler publishes a value to an output with the put
statement, which is valid in application and context handlers:
The value put sends is type-checked against what the output declares.
Receipt above is declared shows record ExampleOrder, so put wants that
whole record — publishing one field of it is an Error. An output is the shape
the user receives, so if a single field is what the user should see, declare an
output that shows that field's type rather than narrowing at the put.
An output that no handler ever writes to draws a CompletenessWarning when a use case claims to show it — see Use Case witnessing.
Design References¶
An output may carry a figma reference linking it to the frame that depicts it.
Occurs In¶
Contains¶
flowchart TD
Output(["Output"]) -->|nested| Output
Output --> TypeRef["a type or constant reference"]