mercredi 21 mai 2014

Why have both View Controllers and View Models in MVVM?

I'm very familiar with MVVM, having worked with the pattern in WPF/Silverlight as well as with Knockout.JS. I haven't tried building anything with Ext JS 5 yet, but attended Arthur's webinar today.

In those other MVVM systems, the View Model contains behaviors/commands which are also bound to the view via data binding, so I've never had a need for a separate View Controller class.


Why is Ext JS 5 structured as MVVM+VC instead of simply MVVM? Why should there be a separate class for handling behavior outside of the View Model?


It seems like adding a View Controller on top of MVVM adds unnecessary complexity to the pattern.





Aucun commentaire:

Enregistrer un commentaire