So far we have used data forms provided by WCF RIA services to talk to the data. This is fine for small applications or for certain data objects, but once the application grows, the state we want to show the user may not be in 1 - 1 correspondence with the database tables.
We also do not want to show all the data views to all users, we would like to control the access of what a user does in the system.
Putting all our data access code in the XAML code behind, is not good from the perspective of testability.
For all the above reasons, we usually add a layer between the View (XAML and it's code behind), and the model (domain service classes), to perform all the the above tasks. This layer is the View-Model layer.
No comments:
Post a Comment