The only advantage I can come up with relates to the MVVM pattern over MVP (of which it is an option) is that in MVVM you do not need to explicitly bind View to ViewModel (Presenter), as you will be in the MVP implementation. This is provided by the facilities provided by WPF. (BindingExpressions are most important). In MVP, you define an interface that represents how the presenter can interact with the view (IxxxxView is a common naming pattern), and when you create the presenter, you pass it a view interface (which is attached to it in the view instance). It also allows for some viewing options on top of a common presenter.
In MVVM, you do not explicitly define this interface. You define your ViewModel and use Binding to bind the ViewModel (logic) to the view (s). There is no built-in knowledge about the ViewModel in the view, since bindings (if they are executed in XAML) are allowed at runtime (or sometimes in the designer). Theoretically, a WPF application should be fully manageable without a user interface.
The advantage that you get from MVVM / MVP / MVC is, first of all, the separation of problems between presentation and business logic and what this allows. It allows specially qualified roles (read: actual graphic designers) to work on a presentation without having anything to do with knowledge of C # / VB.NET code. They can create a presentation, and the developers will come along and pick things up after that.
In addition, developers now have templates that can automate code testing using unit tests. Because applications can be managed (mostly) without a user interface, unit tests are a great tool that allows developers to really implement all the code they write.
In fact, this does not compare the comparison between N-Tier and MVVM, although I do not know that this is a comparison of apples with apples. Perhaps WPF MVVM applications are N-tier applications with multiple logical layers in a solution.
Ultimately, MVVM / MVP / MVC are all very comparable models with the same benefits. One thing though, however, is that MVVM, as I know, can only be used when WPF / Silverlight is the preferred presentation technology. And I guess this is the only advantage of MVVM. This is the specific and optimal template for us in WPF / Silverlight. After using MVVM, it would be inconvenient to use any other template in WPF.
source share