2.3 KiB
2.3 KiB
AyCode.Blazor — Domain Rules
This is the single source of truth for Blazor/MAUI UI domain rules. Do not duplicate these elsewhere. For core framework rules see:
../AyCode.Core/.github/copilot-instructions.mdFor detailed docs see:README.md→docs/
DevExpress Components
- DevExpress Blazor 25.1.3 — always use
DxGrid,DxFormLayout, etc. Do NOT mix with generic Blazor component libraries. - Grid system uses
AcSignalRDataSourcefor real-time data — grids fetch data via SignalR, not REST. - CardView components wrap DevExpress grids with card-style layout for mobile-friendly display.
Architecture
- Blazor.Components is the main UI library — both Blazor Server and MAUI Hybrid consume it.
- Blazor.Models = shared view models (client + server). Blazor.Models.Server = server-only scaffolding.
- MAUI.Core targets Android (API 33+), iOS (15.0+), Windows (10.0.19041+) via platform folders.
- Controllers project is scaffolding — do not add business logic here.
Serialization in UI
- SignalR uses AcBinaryHubProtocol (custom binary) — not the default JSON protocol.
- Grid filters use AcExpressionNode serialization — LINQ expressions are serialized and sent to server.
Related Solutions
- AyCode.Core solution (
../AyCode.Core/AyCode.Core.sln) contains all core framework code (SignalR, serialization, data sources, base classes, interfaces). When a type is referenced in this Blazor solution but not defined here (e.g.AcSignalRDataSource,AcBinaryHubProtocol,IId<TId>,AcObservableCollection,AcLoggerBase), look it up in AyCode.Core source. - For AyCode.Core domain rules see:
../AyCode.Core/.github/copilot-instructions.md
Conventions
- Do not suggest removal/rollback as a solution — find a fix for the problem.
- All DLL references to AyCode.Core projects are via
DllReference(not ProjectReference) — this is intentional. - No redundant code — before writing new logic, search for existing methods. Reuse or extract shared logic into smaller methods rather than duplicating.
- Keep all .md files in sync — when you modify code, update any affected .md file (README.md, docs/, GLOSSARY, ARCHITECTURE, CONVENTIONS, etc.). If you notice any .md content does not match the current code, fix it automatically.