Pages

Monday 13 August 2012

Windows 8–Data binding Part 2

In my previous blog post I introduced data binding.  It worked, but there was no mechanism for updating.  Updating comes in two flavors, and these are often confused by folks new to databinding:
  1. Someone else updates the underlying data; we’d like the display to be updated
  2. The user updates the data on the display, we’d like the underlying data to be updated
The first case arises because most of the time you are not the only user of your program – other users may be connected to the same data and while you are looking at your data someone else may change it.  You want to see that change immediately.  The canonical example is this: you work at a bookstore and someone calls and asks whether you have a particular book in stock.  You check and say yes, you have one left.  While they are deciding whether to purchase it, another employee has sold that book.  The quantity-on-hand just dropped from one (plenty of books for your customer) to zero (oops).  You really would like to see that change reflected in the UI. 
Read full article here

No comments:

Post a Comment

Web Informer Button