Lifting App State with Geoffrey Huntley

Sign in to queue

Description

This week, James is joined by friend of the show and Microsoft MVP Geoffrey Huntley to discuss lifting app state with Reactive Extensions (RX). Geoffrey gives a full overview of RX and Reactive UI and how it can help developers compose their application logic easier. He walks through full concepts and how to convert some MVVM code over.

Embed

Download

The Discussion

  • User profile image
    ShardingKing

    Is the pattern of toggling IsBusy really a race condition? I thought this was a thread safe design in the UI world because you're forced to use the UI thread to make any changes that effect UI. 

  • User profile image
    modplug

    @ShardingKing:If you manipulate IsBusy from different places in your code it will become a potential problem. Imagine that you have 3 different functions / tasks that changes the IsBusy property. If two of them starts at the same time, one will finish first and trigger IsBusy = false. And thus the IsBusy property is not telling the truth considering only one of the tasks have finished. You can account for this by keeping local state in your viewmodel, but that's when you end up with alot of state which this library helps you avoid

  • User profile image
    ShardingKing

    @modplug:Thanks for the dialogue. I think the gotcha here was that the application allows more than 1 action to hold the busy state at the same time vs checking that the state isn't busy before allowing a command to run. In this scenario, reactive extension definitely makes it cleanly possible to do this. Thanks again.

  • User profile image
    misterfast1

    Eeeeezz

Add Your 2 Cents