AyCode.Blazor/docs/ARCHITECTURE.md

1.5 KiB

Architecture

Dependency Graph

AyCode.Core Solution (DLL references)
    ↑
AyCode.Blazor.Models ← AyCode.Blazor.Models.Server
    ↑
AyCode.Blazor.Components ← AyCode.Blazor.Controllers
    ↑
AyCode.Maui.Core (MAUI Hybrid host)

Rule: UI projects reference AyCode.Core via DLL (not ProjectReference). This separates build graphs.

How It Works

Blazor Server

  1. AyCode.Blazor.Components provides all UI components (grids, card views, forms)
  2. Components use AcSignalRDataSource to communicate with server via SignalR
  3. SignalR uses AcBinaryHubProtocol for high-performance binary serialization
  4. Grid filters are serialized as AcExpressionNode trees

MAUI Hybrid

  1. AyCode.Maui.Core hosts Blazor components in a WebView
  2. Same components, same SignalR connection — different host
  3. Platform-specific code in Platforms/ folders (Android, iOS, Windows)

Data Flow

User → DxGrid → AcSignalRDataSource → SignalR (AcBinary) → Server Hub → DAL → Database
                                                                    ↓
User ← DxGrid ← AcSignalRDataSource ← SignalR (AcBinary) ← Server Hub

Key Design Decisions

  • DevExpress 25.1.3 exclusively — no mixing with other component libraries
  • SignalR over REST for grid data — enables real-time updates and binary protocol
  • Expression serialization — grid filters evaluated server-side, not client-side
  • Shared components — Blazor Server and MAUI Hybrid use the exact same component library