Home · Language Reference · Index · Source code

Language Reference

All pattern problem and solution statements, organised by category

Semi-Autonomous Client

When the application needs high-speed interactivity or has complex editing requirements, it cannot depend on the server for every interaction.

Therefore: give the client more autonomy by managing interactions locally. Load state from the server, manipulate it on the client, then send results back to the server for long-term persistence.

Single-Page Application

Describe the problem in one or two sentences.

Therefore: create an entirely client-rendered application which only requires one actual page load from the server, fetching all subsequent data asynchronously. Ensure the client always has enough code loaded to render all screens and interactions needed by the user.

The Application Layer

Writing domain logic in off-the-shelf database systems is difficult, and providing clients direct access to a database is insecure.

Therefore, create a layer of software that runs on the server and mediates access between clients and the data store. Call this layer the “application”. Its role is to provide interfaces to clients which satisfy their use-cases, and to ensure that each interface manipulates the data in the store in a consistent way.

URL As The Source Of Truth

Describe the problem in one or two sentences.

Therefore: ensure that each major state change in your application is represented by, or ideally driven by a change in the URL. Ensure that if a client opens your application to a URL, the state associated with that URL is loaded correctly, as if they had navigated there through any other approach (deep-linking).