Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ReactiveUI

Ana Betts
November 06, 2012

 ReactiveUI

Talk I gave at QCon SF - demo is at https://github.com/reactiveui/RxUI_QCon. Make sure to view each commit in order, as it's a step of the demo!

Ana Betts

November 06, 2012
Tweet

More Decks by Ana Betts

Other Decks in Programming

Transcript

  1. Write completely non-blocking UIs whose interactions are described in a

    declarative fashion, and be able to test long-running timelines instantly using virtual time Why is that cool?
  2. Not just limited to XAML! • ReactiveUI works even on

    non-XAML platforms • Preliminary support for Cocoa / UIKit, GTK#, and Android • Runs on .NET 4.0, .NET 4.5, Silverlight 5, WP7, WP8, Metro / WinRT, and Mono
  3. Code in XAML code-behind is untestable - let’s move as

    much of our behavior into a separate object that we can test, and abstract away commands from how they’re invoked (button clicks) MVVM
  4. How WhenAny Works • WhenAny determines at runtime how to

    be notified for a property change on an object • INotifyPropertyChanged • DependencyObjects (XAML) • Key-Value Observing (Cocoa)
  5. OAPH • Subscribes to an IObservable for you and “pipes”

    it to a property • Makes sure that notifications come back on the UI thread
  6. CanExecute is IObservable<bool> • You can source this IObservable from

    anywhere • One particularly useful place, is from WhenAny