Metalama for UI Apps
Metalama can save you a significant amount of redundant code and reduce errors when implementing UI apps, whether they run on desktop, mobile, or browser through WASM. UI apps are often complex, requiring a lot of boilerplate code to make them reactive to user input. Metalama aids in implementing observability (allowing the UI framework to react to data changes), input validation, memoization, and framework-specific constructs such as dependency properties or commands in WPF.
Pattern | How Metalama can help |
---|---|
Change Tracking | Automatically implements IChangeTracking or IRevertibleChangeTracking interfaces, reducing boilerplate code. |
INotifyPropertyChanged | Automatically implements the INotifyPropertyChanged interface, eliminating repetitive code and reducing errors. |
Memoization | Turns standard read-only properties into memoized ones without boilerplate, improving performance. |
Undo-Redo | Implements the Memento pattern to support undo/redo functionality. |
Command | Generates plumbing code for WPF commands, integrating with Observable aspect for CanExecute logic. |
Dependency Properties | Turn C# auto properties into WPF dependency properties. Compatible with Code Contracts. |