Skip to content

4. Core Concepts

4.1. One Spec, Five Source Flavors

VMx is defined once in spec/ and implemented idiomatically in C#, Python, TypeScript, Swift, and Rust. The conceptual model stays aligned even when naming changes by flavor.

4.2. Lifecycle-Aware ViewModels

Every VM participates in the same construction state machine: Destructed, Constructing, Constructed, Destructing, and terminal Disposed. Construction, destruction, reconstruction, and disposal are part of the framework contract rather than host-app convention.

Disposal itself is framework-wide and idempotent: independent teardown paths may call it without consumer-side coordination. The complete per-type behavior is in the Disposal Contract.

4.3. Message Hub and Dispatcher

Each VM receives a message hub and dispatcher. The hub carries property and lifecycle messages across the tree, while the dispatcher centralizes foreground and background scheduling for reactive work.

4.4. Parent-Child Ownership

Leaf ComponentVMs model a single node. CompositeVM, GroupVM, and AggregateVM1..6 define ownership and traversal rules for children. Parent references, depth-first lifecycle cascades, and current-selection semantics are part of the shared shape.

4.5. Shared VM Collections

Groups and composites implement one ordered observable collection capability. Selection is a separate extension implemented only by composites. The shared atomic move operation changes order without replacing, reconstructing, reparenting, or deselecting the child; see the VM Collection Contract.

4.6. Idiomatic Naming by Flavor

Flavor Naming style
C# PascalCase
Python snake_case
TypeScript camelCase
Swift camelCase
Rust snake_case methods, Rust-style type names

Message payload property names follow the local idiom, with the documented Count channel exception for collection messages.

4.7. Conformance Catalog

The spec defines 412 conformance IDs: 407 library IDs plus 5 THEME-00x scenario IDs. Every catalog-complete flavor carries the 407 library IDs in its own conformance suite, and repository tooling checks coverage before CI passes.