Skip to main content

migrid-ux

This repository is intended as the source of truth for a series of small web applications and their supporting libraries which will form various portions of the MiGrid user-facing web interface. They are currently under extremely heavy development in branches whose content is subject to extensive change until such time as they are merged to the main branch.

Basic principles

Applications are structured around a clean separation between their state, and a rendered representation which is derived from the data contained within it. The "data" backing an application, which we refer to as their state, is bound (see binding) to a the on-screen HTML markup.

Handling of state

The state is represented as a series of observed values which signal when they are changed. Such values is commonly referred to as observables. These values are grouped into namespaces of related values, each of which can be individually serialised on demand.

Binding to observables

The HTML of the application is annotated with a series of binding attributes which are processed and e.g. any required event handlers attached. As a user interacts with the web page the values within the observables change, and any programmatic changes to observables are reflected within the browser.

Contained libraries

This repository contains a basic browser runtime enabling the construction of dynamic web applications as HTML that is bound to an observable-based state.

Heavy inspiration is taken from older solutions to this problem, in particular Knockout, but client side templating is omitted in favour favour of the use of server-side rendering of HTML fragments which are handled in a fashion similar to the more recent htmx.

Supporting modules

lib/binding.mjs

This is responsible for wiring HTML markup to observables present in the state.

lib/observable.mjs

Provides the basic observed value primitives.

lib/state.mjs

Exposes both a type and a number of construction functions which can generate and manage the observable values for a particular application based upon the delcarative definition of required values specified by a given application.

Usage

The repository is arranged to be consistent with migrid-sync and as such the main functions are exposed via a Makefile at the top level. A basic bringup involves running:

$ make local

Running the above will have the effect of installing and necessary dependencies for local development and provisioning a virtual environment to allow the use of a fake backend intended to support rapid iteration ruding development. As a final step a local web server and local backend will be started, with the application then being accessible at: http://localhost:8880

Glossary

binding

The process of attaching DOM elements to their respective observables.

namespace

A grouping of observable values which are considered to be related.

observable

An embellished value able to signal interested parties when it is changed.

state

The complete set of observed values that represent an active application.

Licensing

The source code is licensed under GPLv2 or MIT as defined by the source in question. These licenses can be found under the [here]LICENSES directory.

Release files for migux 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for migux 1.2.0
File Size Uploaded
migux-1.2.0.tar.gz 54.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for migux 1.2.0
File Interpreter ABI Platform
migux-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 122.1 kB

Release files / migux-1.2.0.tar.gz

Download URL migux-1.2.0.tar.gz
Size 54.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f3b26c8c6712cbef3a2784f6596e881e5ebb6a2f8fd3221731dc70ab8181d68f
BLAKE2b-256 checksum
How to use checksums
9fb2f081752a5ffa752e8d3d0a2573ff11d97aaef95ba8f2d2b6b1932887b331
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Release files / migux-1.2.0-py3-none-any.whl

Download URL migux-1.2.0-py3-none-any.whl
Size 67.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9409410137e61e48b52251fb0e840a3de088d0ceee0352d29024a7f0b497d3d
BLAKE2b-256 checksum
How to use checksums
3cc25a2c6012175151149b767c40dd00ef203778a2ba3a1abe262bfe9c56f5f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Release history Release notifications | RSS feed

1.19.0

2 release files

1.18.0

2 release files

1.17.0

2 release files

1.16.0

2 release files

1.15.0

2 release files

1.14.0

2 release files

1.13.0

2 release files

1.12.0

2 release files

1.11.0

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page