Update: Version 1.0 of Simple MVVM Toolkit Express has now been released and is based on version 1.0 RTM of .NET Core: https://www.nuget.org/packages/SimpleMvvmToolkit.Express. Source code and samples can be found here: https://github.com/SimpleMvvm
Now that .NET Core is stable and RC2 has been released, and the .NET Platform Standard has been proposed to replace Portable Class Libraries, I thought it would be a good idea to port my Simple MVVM Toolkit to .NET Core and provide support for additional platforms, such as Universal Windows Platform and the latest version of Xamarin for cross-platform mobile apps, included iOS from Apple and Android from Google.
Rather than update my existing repository, I decided it was time for a fresh start. So I createed a new project on GitHub called Simple MVVM Toolkit Express. It is compatible with the following platforms:
- Portable Class Libraries: Profile 111 – .NET 4.5, AspNet Core 1.0, Windows 8, Windows Phone 8.1
- .NET Framework 4.6
- Universal Windows Platform 10.0
- Mono/Xamarin: MonoAndroid60, XamariniOS10
- .NET Core 1.0: NetStandard 1.3
I decided to break compatibility with the following legacy frameworks: .NET 4.0 and Silverlight.
The toolkit has all the major features of the classic version, including classes for models and view models, support for validation and editing with rollbacks, as well as a leak-proof message bus (aka mediator or event aggregator). Platform-specific threading implementations have been removed, because it’s better to use C#’s built-in async support.
I published a pre-release NuGet package, which you can find here: https://www.nuget.org/packages/SimpleMvvmToolkit.Express. And I’ve created samples for WPF, UWP and Xamarin, which you can find on the SimpleMvvm home repository.
I used the dotnet CLI (command-line interface) tool chain to build the project and generate a multi-targeted NuGet package, but I had to modify the generated nuspec file to work around some compatibility issues. In the end, it was a great learning experience, and I found it reassuring that I could continue to use a popular framework for building many different kinds of client applications using the Model-View-ViewModel design pattern.