Examples

The distribution includes two kinds of programs: 43 small programs, each explaining one feature, numbered in reading order; and screens that run in a browser.

Every screen comes with an HTML file written by a designer. The LPScript program contains no HTML. It clones sample elements from the HTML, fills in values, and names the message to send when an element is clicked.

One page per screen:

Shared components

Components that belong to no screen are kept in separate files and imported by path.

Components that are not actors: the confirmation dialog, the calendar, and the pager. The dialog and the calendar carry their own markup. The pager takes two numbers and returns a page number. None of them holds state, so none depends on the class of the screen using it.

Components that are actors: the overlay shown during a request, and the region where server errors are displayed. A screen waiting at forced is not redrawn while it waits, so a component that must change during the wait cannot be part of the screen's state. It has to be a separate actor.

Others: the gateway (takes a service name and a payload, returns the response body only when the server reports success), validation (reads a rules file shared with the server), the store (splits sessionStorage into values kept for the session and values read once), and the socket (WebSocket with disconnect detection and reconnection).