技能 编程开发 Avalonia Zafiro 开发准则

Avalonia Zafiro 开发准则

v20260309
avalonia-zafiro-development
为 Avalonia UI 与 Zafiro 工具链开发制定必须遵循的规范,涵盖 MVVM 调度、ReactiveUI/DynamicData 流程、错误处理、安全性以及可复用辅助方法,确保跨平台界面代码一致且可维护。
获取技能
364 次下载
概览

Avalonia Zafiro Development

This skill defines the mandatory conventions and behavioral rules for developing cross-platform applications with Avalonia UI and the Zafiro toolkit. These rules prioritize maintainability, correctness, and a functional-reactive approach.

Core Pillars

  1. Functional-Reactive MVVM: Pure MVVM logic using DynamicData and ReactiveUI.
  2. Safety & Predictability: Explicit error handling with Result types and avoidance of exceptions for flow control.
  3. Cross-Platform Excellence: Strictly Avalonia-independent ViewModels and composition-over-inheritance.
  4. Zafiro First: Leverage existing Zafiro abstractions and helpers to avoid redundancy.

Guides

Procedure Before Writing Code

  1. Search First: Search the codebase for similar implementations or existing Zafiro helpers.
  2. Reusable Extensions: If a helper is missing, propose a new reusable extension method instead of inlining complex logic.
  3. Reactive Pipelines: Ensure DynamicData operators are used instead of plain Rx where applicable.

When to Use

This skill is applicable to execute the workflow or actions described in the overview.

信息
Category 编程开发
Name avalonia-zafiro-development
版本 v20260309
大小 5.16KB
更新时间 2026-03-10
语言