Pros and Cons
We now hopefully have a better appreciation for what MVVM is and how it works. Let’s now review the advantages and disadvantages of employing the pattern.
Advantages
MVVM facilitates easier parallel development of a UI and the building blocks that power it.
MVVM abstracts the View and thus reduces the quantity of business logic (or glue) required in the code behind it.
The ViewModel can be easier to unit test than in the case of event-driven code.
The ViewModel (being more Model than View) can be tested without concerns of UI automation and interaction.
Disadvantages
For simpler UIs, MVVM can be overkill.
While data bindings can be declarative and nice to work with, they can be harder to debug than imperative code where we simply set breakpoints.
Data bindings in nontrivial applications can create a lot of bookkeeping. We also don’t want to end up in a situation where bindings are heavier than the objects being bound to.
In larger applications, it can be more difficult to design the ViewModel up front to get the necessary amount of generalization.