Semblance
RDF-native UI

The UI is data.

Semblance is a web UI framework where the whole interface is live data: what is shown, what you type and what you do. Rules turn that data into the screen, into text, into anything, and keep it current as the data changes.

Use the example: what you do changes its data, and the screen and the text follow.

On screen

Data

  • ex:t1Write the core ontology
    • ex:done
      • true
    • ex:priority
      • 1
    • rdfs:label
      • "Write the core ontology"
  • ex:t2Sketch the style layer
    • ex:done
      • false
    • ex:priority
      • 2
    • rdfs:label
      • "Sketch the style layer"
  • ex:t3Wire up behaviour
    • ex:done
      • false
    • ex:priority
      • 3
    • rdfs:label
      • "Wire up behaviour"
Viewing↵follow← →open, close⇧F10menu

Query projection

New todo: [_]
[ Add ]
[x] Write the core ontology
[ ] Sketch the style layer
[ ] Wire up behaviour

Why it matters

Semblance is a live data system, not a program driven by events. The interface is data, and rules over that data.

Handlers and component state

An event handler mutates state kept inside components, and the screen is whatever the handlers last left. The state is scattered across objects, out of reach of tools, and each feature wires its own updates.

vs.

Data and rules over it

Rendering is a projection of the data that stays current, incrementally. An interaction is data too: an event in a change log, which reactions turn into one change. The same graph projects to the screen, to text and to anything else.

Inspectable

Every piece of state, every rendered node and the rule that made it can be looked at.

Queryable

Ask the interface anything in SPARQL: what is shown, what changed, what is invalid.

Persistable

State is triples, so keeping it is writing them down: policies say what, where and for how long.

Replayable

Every interaction is an event in a change log with the change it made: replay it, undo it, audit it.

One source of truth

The screen, the text and every other view are projections of one graph, so they cannot disagree.

Cost follows the change

Only the rules a change touches run again: an interaction costs what it changes, not the size of the app.

Components are data

OWL · SHACL

A component is a class in an ontology, with SHACL shapes for what an instance must say. Your app is instances of them: a graph you can query, validate, diff and store.

Rules are queries

SPARQL · functions

Renderings are SPARQL CONSTRUCTs into RDF/HTML, with function twins that render the same. The engine re-runs only the rules whose input changed, member by member.

Layers decorate

a11y · l10n · validation

Accessibility, localization, validation, keyboard shortcuts, privacy, persistence and docs are layers: rules that add to every component without it knowing.

Interactions are a change log

LDES

What you do is recorded, with what it changed, in a bounded, linked change log (an LDES stream) you can replay, inspect and remember; reactions - CONSTRUCT pairs - turn each entry into one change.

Cost stays constant

measured

Hidden views are not evaluated; reads are traced; logs are read from their head. Tests require the work of each interaction not to grow with the app or its history.

Themes restructure

11 themes

Styles compile from the ontology: tokens, variant axes, intents. A theme can re-colour the interface or rebuild its title bars, docks and controls - try Cupertino, Classic or Fluent.

A component, and what it becomes

try it
ui:signinCode a c:CodeInput ;
    c:label "Sign-in code" ;
    c:length 6 ;
    c:groupSize 3 ;
    c:cellStyle c:Filled .

Type or paste a code. Each keystroke is an RDF event; a reaction keeps the digits and writes c:value; the rules redraw the cells. Open the tools (⌘.) and hover the field to see its rules and provenance.