I have been looking into MVVM recently and I seem to get the overall idea. There are a couple of niggly bits though that I do not fully understand and was hopping to get some answers here, cheers!
Is it incorrect to use one data model for the whole application. Usually if I am creating a small utility I would have all of the logical data in one class. This means i can have somethings like the following:
DataStore myData = new DataStore;
If it is OK to have one data model is it ok to have more than one model view, say one representing each window or view (This is how I envision MVVM working).
Given then above if one has multiple model views it would seem that the model would have to be declared before the first window (view), where should it be declared? should the model be passed via a reference to subsequent model views? Would this not be a source of coupling as the window or page (view) would need to know about the model to pass it to its model view since the view instantiates the model view.
Sorry if this is a lot of questions, I get the idea of MVVM in a single window or page sense but once I add multiple views my system breaks down. I can get it to work with seperate models accessing an outside source to grab its data but if the data needs to persist between views I get lost.
Thanks to all that take the time to respond!