MVVM (Model - View - ViewModel) is an adaptation of the MVP (Model -View - Presenter) or MVC (Model - View - Controller) patterns, both of which are very popular design patterns for C++ applications. The main changes to the design pattern are to better support WPF and Silverlight so it isn't so much that WPF suits MVVM, more that MVVM suits WPF.
Primarily the changes revolve around cleanly supporting the binding and command architecture present in the XAML technologies through use of INotifyPropertyChanged
and ICommand
objects. Once again these changes wouldn't help in C++ since it doesn't have any native support for these high-level concepts. That isn't to say that you couldn't mimic all this functionality in C++, but on the way you would pass through using a basic MVP/C pattern and in most cases that is "good enough".
It's nothing really to do with C++, or any language per se, it's more down to the fact that it only makes sense in a WPF/Silverlight context.
The only thing that MVVM brings to the table that other view/logic separation patterns do not is WPF/Silverlight commands/binding. The main reason for using MVVM is to leverage the powerful binding system built into WPF/Silverlight, it just doesn't makes sense to talk about it in different contexts, unless they have a similar model.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With