MVVM criticism
Most literature i've been reading raves about MVVM, but in the spirit of a critical pedagogy, it's good to remember MVVM can't serve as a panacea.
Alexander Biskop's venting session scrutinizes, as opposed to only evangelizing, the pattern à la mode. Biskop's primary charge is aligned with the MVVM sample applications i've seen thus far-they are usually some variation of a form-based record editing application.
"MVVM is an *awesome* template for record editing applications and simple projects, but I would *never* recommend it for a large-scale application."
In the remainder of the forum based rant, Biskop cites and discuses points from the MVVM article on Wikipedia.
"There are currently three main areas of criticism regarding the MVVM pattern.
The first is that MVVM currently lacks standardization from Microsoft both in implementation and in toolsets. For example, the community has some lack of clarity about where and whether to implement View logic in the View layer or the ViewModel. Given that the MVVM pattern is still relatively new, and that new tool-sets, walkthroughs, or patterns, such as Onyx , the Microsoft WPF Toolkit , Caliburn , MVVM Light Toolkit , and Calcium are being released, this problem may be solved over time. Microsoft has announced in discussion boards that the MVVM template pattern will be released in Visual Studio 2010 .
The second comes from MVVM creator John Gossman himself [8], who points out that the overhead in implementing MVVM is "overkill" for simple UI operations. He also states that for larger applications, generalizing the View layer becomes more difficult. Moreover, he illustrates that data binding, if not managed well, can result in considerable memory consumption in an application.
The third is that the exercise in creating large numbers of data bindings to the ViewModel results in duplicate code and maintenance problems[9]. Additionally, because of the nature of the semantics of data bindings, critics suggest that the ViewModel does not directly describe the View."
Biskop's post reminded me to examine when and where MVVM should and shouldn't be used. Thanks, Mr. Biskop!
- Anonymous
May 02, 2010
I think that there are some new factors: "Superior Tooling". Blend 4 is not just "The new version of Expression Blend", but a carefully constructed foundation to Designer/Developer workflow that is built on top of View/View Model interaction. I no longer think that NOW, it can be said that "MVVM is "overkill" for simple UI operations". I realize that it may have been true at the time he said it. Just an opinion :)