Thursday Night

Paul Betts’s personal website / blog / what-have-you

Announcing ReactiveUI 3.1

What does ReactiveUI do?

ReactiveUI is a M-V-VM framework like MVVM Light or Caliburn.Micro, that is deeply integrated with the Reactive Extensions for .NET. This allows you to write code in your ViewModel that is far more elegant and terse when expressing complex stateful interactions, as well as much simpler handling of async operations.

What’s New in 3.1

Tons of stuff.

ReactiveUI has improved dramatically since the previous version. Over the next few weeks I’ll be posting blog articles on how to use new features in ReactiveUI, but here’s the short list:

  • User Errors: – A new API to separate the generation and presentation of errors that should be presented to the user in a friendly way. This is the Testable, Elegant, user-friendly way to make that MessageBox.Show() call.

  • ReactiveUI.Routing – An entirely new component to ReactiveUI, designed for creating multi-page applications using Dependency Injection / IoC, while not being tied to any specific IoC container.

  • First Class Async / Await Support – ReactiveUI now allows you to use Task<T> in many places in the framework where it makes sense.

  • Ordering and Filtering of Models – using the new CreateDerivedCollection methods, ViewModel collections that “follow” Model collections and apply custom filtering / ordering are now easy to create.

  • NLog Logging – A rewritten logging framework, based on NLog

  • Preliminary support for WinRT (including async/await via LinqToAwait) and Gtk# on Mono 2.10.

  • An overhaul of how ReactiveUI handles binding errors that results in more reliable applications.

  • Many cleanups to APIs to make using ReactiveUI more straightforward and intuitive

A new sample: Play for Windows

Many of the new features in ReactiveUI 3.1 were prototyped and refined in Play for Windows, a .NET 4.5 client for the Play Music Server. This application is a production-quality application that demonstrates many of the new ReactiveUI features, especially Routing and RxUI.Testing.

Breaking Changes

ReactiveUI is now following the SemVer versioning scheme. This means, that v3 now has breaking changes. However, apart from one, these changes shouldn’t be overly difficult to fix.

  • Deprecated Platforms – ReactiveUI has dropped support for .NET 3.5, SL4, and WP7.0. You must upgrade to .NET 4.0/4.5, SL5, or WP7.1 (Mango) to use ReactiveUI 3.1. Rx has decided to deprecate these platforms soon as well.

  • Logging Changes – The interface between RxUI 2.5’s Log() method and RxUI 3.1’s is slightly different (methods like “InfoFormat” are now just “Info”, etc.)

  • Disabled Bindings now Crash – In ReactiveUI 2.5, if an ObservableAsPropertyHelper or the CanExecute of a ReactiveCommand terminates with OnError, the exception disappears into the ether and the binding stops working. In RxUI 3.1, this will result in an item being sent to the new ThrownExceptions Observable.

    This Observable is special, in that if there are no Subscribers, items gets sent to the global RxApp.DefaultExceptionHandler, which by default, crashes the application.

  • Deprecated / Changed Methods – Some methods, particularly in MessageBus and ReactiveUI.Testing, have changed names to be more consistent with Rx (i.e. AdvanceByMs vs. 2.5’s RunToMilliseconds), or have been removed, such as ObservableCollectionView (use CreateDerivedCollection() instead).


Thanks to the following people for contributing patches to ReactiveUI 3.1:

  • Phil Haack
  • Johan Laanstra
  • Lowell Smith
  • Stanislaw Swierc
  • Tim Clem

Written by Paul Betts

April 23rd, 2012 at 11:35 pm

Posted in Uncategorized