F
F
frsasa2015-12-10 13:34:54
Windows phone
frsasa, 2015-12-10 13:34:54

MVVM, who should load-save in IsolatedStorage?

I'm trying to learn MVVM on Windows Phone.
Let's say there is an application with View, ViewModel and Model.
I want to load-save my application settings in IsolatedStorage.
Where is it correct, from the point of view of MVVM, to place the code that loads and saves the settings of my application?
in Model? or ViewModel?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyacheslav Zolotov, 2015-12-11
@frsasa

1. To store settings, there is a special class that stores them in a specially designated place for this, google.
2. If you shove everything into the VM, it will be too fat, and this is not true from different points of view.
If you use IoC containers, then a service should work with IsolatedStorage, which abstracts from a specific platform, i.e. from WinPhone (it will be especially useful for cross-platform development on Xamarin). This service is essentially a data access layer, i.e. model.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question