MVVM can be seen as an augmentation of MVC. Introducing the view model concept, it recognizes that not every view concerned with a dataset will be using this data in the same way. It adds a layer of indirection between a view and a model, called a view model, to solve this issue. It also keeps separation of concerns to the fore; why should the model, which is dealing with our data be concerned about anything to do with our view, which is dealing with presentation?
With Ext JS 5, MVVM is wholeheartedly embraced. The sample application structure that Sencha Cmd generates will provide a ViewModel
class alongside the View
class. This has tight integration into the View
class via new configuration options, which make it a first-class citizen when trying to solve the common problems that arise in a large MVC application, as we discussed earlier.
In addition, a ViewController
class is created to encapsulate the logic you'd...