I'm fairly new to the whole n-tier architecture thing, and I had some questions about using MVVM with a 3-tier application.
From my understanding, we have:
- The View, or UI layer, which is the xaml file
- The Model, which is a custom class containing properties and methods that "models" the data object
- The ViewModel, which is the "adapter" between the View and the Model
- A WCF Server which is supposed to handle Database Access among other things
- SQL Database for storing data
My question is, how do I put this all together using the Data Access Layer? With MVVM, I would have the models contain the methods to Load/Update themselves. Instead should this be something that happens on the WCF Server? If so, should the reference to the server be stored in the Model or the ViewModel? And how should it be called?