技能 编程开发 Avalonia Zafiro 开发规范

Avalonia Zafiro 开发规范

v20261106
avalonia-zafiro-development
本技能定义了使用 Avalonia UI 和 Zafiro 工具包开发跨平台应用程序的强制性规范和行为准则。它强调功能反应式 MVVM 模式、显式错误处理、跨平台独立性以及优先使用 Zafiro 抽象。开发者应遵循命名标准、使用 DynamicData 管道,以确保 UI 开发的可维护性和正确性。
获取技能
286 次下载
概览

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.
信息
分类 编程开发
名称 avalonia-zafiro-development
版本 v20261106
大小 5.07KB
更新时间 2026-11-07
语言