Implementing the MVVM pattern with ReactiveUI and Fody

A portable and maintainable codebase is important, especially in large-scale and cross-platform .NET implementations. On XAML-based platforms, such as Windows Presentation Foundation (WPF), Universal Windows Platform (UWP), Xamarin Forms, and AvaloniaUI you can achieve maintainability goals by implementing the MVVM pattern.

MVVM stands for Model-View-ViewModel, where Model represents services, data transfer objects, and database entities related to the application domain, View is the UI and ViewModel’s responsibility is to tie these two layers together in a convenient way. ViewModel encapsulates interaction with Model, exposing properties and commands for XAML UI to bind to.

Traditional MVVM Implementation

To make bindings work a typical ViewModel…


Build beautiful user interfaces with AvaloniaUI

Avalonia is a novel XAML UI framework, allowing .NET developers to deliver cross-platform .NET Core desktop applications for end-users. Inspired by Microsoft stack technologies, such as Xamarin Forms, Windows Presentation Framework, and Universal Windows Platform, Avalonia provides fully-featured means of building high-performant user interfaces of any complexity and any scale. Compared to Windows Presentation Framework, Universal Windows Platform, or Xamarin Forms, Avalonia provides a faster type-safe XAML compiler known as XamlIl, which makes the process of developing and debugging complex XAML interfaces far less painful. Moreover, XamlIl allows debugging XAML — watch this video on YouTube if you are still…


Building reactive graphical user interfaces on Ubuntu with XAML

With the initial release of .NET Core, we can now build cross-platform .NET applications using not only Windows, but also macOS, Ubuntu, and other Linux distros. As a full-stack developer who is pretty excited about the evolution of the .NET ecosystem, I use a laptop with Ubuntu and Windows in dual boot, and with .NET Core SDK installed on both operating systems. However, most of the development time I prefer using Ubuntu KDE. On the one hand, the command-line interface in Linux makes a wide variety of problems way easier to solve, including package management, network configuration, and orchestration of…


How compile-time checks assist .NET devs in delivering software

Imagine you are a C# programmer designing API of a tiny search engine. The engine is really simple — it searches for goods in a database using a query string provided by a user. You sit down, decide not to focus on implementation details yet, and write a simple C# interface:

Fine. You still don’t want to focus on implementation details, you’d like to ask someone to implement that interface for you. But before doing that, you ask yourself — what will happen, if your mate writes buggy code and such code passes code review? You decide to analyze potential…


Getting started with a new .NET Telegram Bot API library

Telegram is a secure instant messaging service providing a platform that allows creating bots — the Telegram Bot API. A Bot is a Telegram account operated by software. There are Bot API implementations for almost every popular programming language, including Python, JavaScript, and C#. Funogram is a strictly typed Telegram Bot API wrapper built completely in F#, a cross-platform functional-first programming language. If you are new to F#, check this guide to get started. In this article, we are going to build our first Telegram Bot using F#, Funogram, and .NET Core.

Getting Started

First, we need to download .NET Core SDK


Validating forms with ReactiveUI and Fody

In the previous article, we took a look at several ways of implementing the MVVM pattern on the .NET platform. We found out, that the simplest approach is to use assembly weaving with reactive bindings and extensions. Now we are going to build a sample application using these techniques. Let’s start with the most common task — form validation.

Getting Started

The MVVM (Model-View-ViewModel) architectural pattern enforces the separation between three software layers, so we can think of extracting the layers into different assemblies. In order to achieve this, worth taking a look at .NET Standard — a formal specification of .NET…

Artyom V. Gorchakov

Full-stack developer, masters student, digital designer twitter.com/worldbeaterdev

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store