Lifecycle

← Documentation
STRVCT

Boot sequence, node initialization, view synchronization, and persistence cycles.

The core design challenge is that the same object must work whether it is freshly created or loaded from storage. A single-phase constructor can't handle both cases — if it creates default child objects, it will overwrite data that was just deserialized. STRVCT solves this with a three-phase sequence: init() sets up primitives and slot defaults, finalInit() creates complex child objects only if they weren't already loaded from the store, and afterInit() runs once the full object graph is ready. This separation means persistence is transparent — a class doesn't need different code paths for "new" vs. "loaded."

Boot Sequence

How the application loads from first script tag to a running app.

View →

App Lifecycle

SvApp initialization, extension points, and readiness signaling.

View →

Node Lifecycle

Creation, three-phase initialization, parent-child relationships, and update notifications.

View →

View Synchronization

How views discover nodes, synchronize state, and batch updates efficiently.

View →

Persistence Lifecycle

How objects are stored, loaded, and kept in sync with IndexedDB.

View →

Headless Execution

Running STRVCT applications in Node.js without a browser.

View →