Introduction

WPF and the MVVM (Model-View-ViewModel) pattern are powerful tools for desktop development. However, as applications grow, the technical plumbing—commands, data binding, notifications—can sometimes cloud the architectural intent. We can easily lose track of the conceptual meaning of our classes behind their technical implementations.

To bring more clarity to my desktop architectures, let's try a lightweight framework Clprolf. The goal is simple: use basic custom C# attributes to give every class a clear, human-readable role, and enforce these boundaries with automated architecture tests using ArchUnitNET.

Here is how it looks in practice.

The Core Concepts: Agents and Workers