How adospace/reactorui-maui works
This project is a UI library—MauiReactor—that builds on top of .NET MAUI using a component-based MVU (Model-View-Update) approach. The file tree and README indicate that its purpose is to allow developers to build cross‐platform UI applications entirely in C#, abstracting away much of the platform-specific details via shared component classes and an MVU pattern.
Main Components
• Core MauiReactor Library – This is the heart of the project and includes the base classes (Component, VisualNode, etc.), UI controls (Label, Button, Layouts, etc.), animations, and helper classes. It encapsulates the MVU approach.
• Platform Abstraction Layer – The library supports multiple platforms such as Android, iOS, MacCatalyst, Tizen, and Windows. Each platform folder in both the samples and src sections shows platform-specific implementations (e.g., PlatformClass1.cs files and native manifest/configuration files).
• Hot-Reload Infrastructure – Separate modules (in src/MauiReactor.HotReloadConsole and related components) provide live reloading of code changes, which is a significant part of the developer experience.
• Integration Modules – The project includes modules like MauiReactor.Blazor for integrating Blazor components and possibly other hybrid models, which enable web-based UI rendering within MAUI.
• Code Generation and Scaffolding – Subprojects such as MauiReactor.Scaffold and MauiReactor.TemplatePack provide tooling and templates for generating boilerplate code and scaffolding out new projects.
• Sample Applications – There is a wide variety of sample applications (e.g., Calculator, ChartApp, Test App, WeatherTwentyOne, etc.) that demonstrate different aspects of the library. These also help to define usage patterns and validate how core components interact.
Relationships and Data Flow
• The Core Library exposes a set of component classes for constructing the UI. These components rely on the MVU pattern, where state changes trigger re-rendering.
• The Hot-Reload Console communicates with the running application’s code, signaling the core library to update rendered UI based on code changes.
• Sample applications sit on top of the library, consuming core components and platform services through the MVU pattern. They should be shown as client apps that depend on and demonstrate the usage of the library.
Architectural Patterns and Design Principles
• MVU Pattern – Illustrate how the “State” flows from component classes and how updates (for example, via event handlers like SetState) trigger a re-render of the UI.
• Component-Based Architecture – Each UI piece (from simple controls to complex pages) is composed as a reusable component.
• Platform Abstraction – The separation between shared code and platform-specific code is emphasized by distinct folders for various platforms.
• Code Generation/Scaffolding – The presence of scaffold generators and templates highlights an emphasis on reducing boilerplate code and keeping UI logic declarative.