MVU/TEA Decomposition Strategies Analysis

Decomposition Style Categories

FRACTAL Style (Recursive MVU Triads)

Each component/module is a complete MVU unit with its own Model, Update, and View. Components nest recursively, parent delegates to children. Child components are self-contained and can be composed.

SLICE Style (Domain-Segregated State)

State is partitioned by domain/feature, but update/view logic may be centralized or cross-cutting. Each slice typically has Model + Update, with views potentially pulling from multiple slices.

HYBRID

Combines both patterns - some aspects use fractal composition, others use slice partitioning.

NO DECOMPOSITION

Framework does not provide explicit support for breaking down complex applications.


Framework Categorization

🟢 FRACTAL Decomposition

1. Elm (Original TEA)

2. Bubble Tea (Go)

3. Iced (Rust)

4. Elmish (F#/Fable)

5. Hyperapp (JavaScript)


šŸ”µ SLICE Decomposition

6. Redux (JavaScript/React)


🟔 HYBRID Decomposition

7. TCA (Swift - The Composable Architecture)

8. Flutter Bloc

9. Android MVI (Kotlin)

10. Meiosis (JavaScript)


⚫ NO EXPLICIT DECOMPOSITION

11. SAM Pattern (JavaScript)


🟣 OTHER / MINIMAL DOCUMENTATION

12-16. .NET Implementations


Summary Table

Framework Style Terminology
Elm Fractal (evolved) Nested TEA, Modules, Translator/OutMsg Pattern
Bubble Tea Fractal Tree of Models, Nested Models, Child Components
Iced Fractal Nested components, Message routing, .map()
Elmish Fractal Nested TEA, Child modules
Hyperapp Fractal-lite (minimal framework, no specific term)
Redux SLICE Slices, Reducers, State combination
TCA HYBRID Reducers, Scoping, Pullback, Child features
Flutter Bloc HYBRID BloC per feature, Nested BloCs, Providers
Android MVI HYBRID ViewModel per feature, StateFlow, Intents
Meiosis HYBRID Services, Nested components (optional)
SAM None N/A (TLA+ formalism focus)
Fabulous Fractal (likely) (F# MVU)
BlazorMVU Fractal (likely) (Elm-inspired)
MauiReactor Fractal (likely) (MVU for MAUI)
MVUX Hybrid (likely) (Extended MVU, data binding)
ngx-mvu Hybrid (likely) (Angular + MVU)

Key Insights

Fractal Pattern Characteristics:

  1. āœ… Complete MVU triads for each component

  2. āœ… Recursive composition (components contain components)

  3. āœ… Message delegation (parent forwards to child)

  4. āœ… View composition (parent combines child views)

  5. āŒ High boilerplate (Elm community moved away from deep nesting)

Examples: Elm (original), Bubble Tea, Iced, Elmish

Slice Pattern Characteristics:

  1. āœ… Domain-partitioned state (slices by feature)

  2. āœ… Flat composition (slices are siblings, not nested)

  3. āœ… Centralized view (views pull from multiple slices)

  4. āœ… Low boilerplate (slices are simple)

  5. āŒ No per-slice views (views are separate layer)

Example: Redux (pure slice pattern)

Hybrid Pattern Characteristics:

  1. āœ… Feature-scoped state (like slices)

  2. āœ… Independent update logic (like fractal)

  3. āœ… Flexible composition (dependency injection, scoping)

  4. āœ… Reduced boilerplate (compared to pure fractal)

  5. āš ļø Framework-specific (each does it differently)

Examples: TCA (scoping/pullback), Flutter Bloc (providers), Android MVI (ViewModels)


Where Does RatatuiRuby-TEA Fit?

Current State: FRACTAL

With Init Callable: ENHANCED FRACTAL

Your Init proposal strengthens the fractal pattern by: 1. āœ… Enabling parameterized initialization (like Iced’s flags) 2. āœ… Supporting initial commands (like Elm’s (Model, Cmd)) 3. āœ… Allowing parent-to-child props (React-style, but fractal) 4. āœ… Maintaining complete MVU triads (Model, Init, Update, View)

This is closer to Iced (Rust) than Elm, as Iced explicitly supports flags for initialization and has evolved beyond Elm’s original design.


Recommendation

RatatuiRuby-TEA should embrace the modern fractal pattern with: - Complete MVU triads per fragment: Model, Init, Update, View - Parameterized initialization: Init accepts flags/props - Explicit composition: Parent calls child Init, routes messages, composes views

This positions RatatuiRuby-TEA as: - Functional (like Elm/Elmish/Iced) - Composable (fractal pattern) - Modern (Init callable, not static constants) - Parameterizable (flags/props support)

NOT like Redux (slice pattern) or TCA/Bloc (OOP/hybrid patterns).