Implementing Redux in C# (Part 1)

This is the first part in the series about porting Redux to C# and using it to build MVVM based apps. In the last post we introduced the concept of stores as a replacement for our repositories and in this post we will see how to create such stores.

So without further ado, let's write our simplest store ever!

public class Store<T>
{
  public T State { get; private set; }

public Store (T initialState) { State = initialState; } }

Read More

MVVM, data stores and Redux

MVVM (Model-View-ViewModel) is the default pattern for most XAML based apps. It forces separating all code used for one screen into separate parts. View is the UI part (XAML or coded) while the model is usually raw data retrieved from database, web service or constructed on the fly. Model is usually too raw to display in the UI and shouldn't contain any business logic. It is also supposed to be a simple POCO (Plain Old C# Object) class, although some logic can be added to it.

Functionality such as validation and data aggregation/formatting is placed in a corresponding one or more ViewModels which are then bound to XAML views. Binding is a fundamental feature found in XAML based UI-s used for connecting UI with data on the backing ViewModel and to connect simple UI interaction to corresponding commands in the view model (e.g. clicking a button).

Read More