Unidirectional Data Flow Architecture

Models and Handlers – Views, Controllers and Triggers

The data flow follows a precise five-step pattern that ensures predictable propagation without circular dependencies.

  1. User interactions are captured by views and stored in input models.
  2. Controllers observe these input model changes and execute appropriate business logic.
  3. Controllers then update output models with processed results.
  4. Views automatically re-render the interface to reflect new output model states.
  5. Finally, triggers monitor model changes and generate finite state machine events when specific conditions are met.

This ViewInput modelsControllerOutput modelsView pattern delivers significant architectural advantages: it makes applications significantly easier to debug and maintain while providing clear separation between data transformation and presentation logic. Crucially, handlers maintain no explicit dependencies on each other, exchanging data exclusively through reactive models.

Models are run-time data containers focused exclusively on data integrity and change notification

Handlers are simple functions associating specific actions with individual process stages, executing when the state machine enters a particular state and optionally providing cleanup functionality when transitioning away.

Views visualize data from output models and capture user interactions to update input models.

Controllers observe changes in models to execute business logic and update output models

Triggers monitor model state changes to generate state machine events moving the process forward.

The architecture provides separation of concerns while maintaining system flexibility. Models focus exclusively on data integrity and change notification, views handle user interface concerns, controllers implement business logic, and triggers manage state machine integration. The reactive foundation ensures automatic change propagation throughout the system while the adapter pattern provides structured access to shared resources. These patterns combine to create maintainable applications that support complex user experiences through composable component interactions.