mvvm - Should I use ObservableCollections in my Model in M-V-VM -


I'm totally new to MV-VM and I'm very new to Silverlight, about it today I have been reading for the first time. As a sample, I am creating a model containing a list of items in my (Silverlight 4) view, there is a list box and my view model will look at the model to reclaim that collection which will bind the list bond. .

My question is, I think it would be good to use an Observative Collection to catch those items that bind the list bond. Will this be a peculiar compilation in ViewModel, should I also use this type of collection in the model, or should I use another collection type and do a SMO conversion between the model and the ViewWould?

There are 3 basic scenarios (in order of increasing complexity):

  1. The model simply provides access to a backend service and does not caching any data that flows through it
  2. The model exposes the collection of objects, VMS does not have its own collection, and then the model Object is limited to the collection
  3. The model exposes the data source, the vms itself which is the collection of this data Serves as a window into Rot, and scenes are obliged to store vms.

In the first case you will simply use the list to pass a requested data for the vms, in other cases you will use ObservableCollection so that both ideas are binding (case # 2) or VMS can update your collection properly (Case # 3)


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -