简体   繁体   中英

networked MVVM Application explanation needed

I'm doing my first WPF / MVVM application which is going to be installed on a networked enviroment, using MVVM I liked the most the OnPropertyChanged thing, lets assume on the Clients I only have the views installed where the ViewModels and Models all at the server, a user now upadted a property on a ViewModel and - for sure - he instantly saw the difference , would this be the same for other users as well ?? ie a user added a new item and now he can see the new item he just submitted, another user is already using the same window , would he also instantly find that item entered by the first user ?

Thanks in advance

Musaab

MVVM uses WPF bindings. Bindings only work locally so there is no way for the ViewModel to be at the server. The Model could though, since your View will only bind to the ViewModel.

So in order to have your idea work at all, you will need a way to let your ViewModel know of any changes in your Model. Since that is not part of MVVM you can choose any solution that fits your needs. Therefore the answer to your question if it would be the same for other users would depend on the solution you choose. This is not really a MVVM question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM