4 ms·
I'd argue that MVVM is a subset of MVC. So technically they're accurate. And also, anything that is "badly done" becomes bad. I'm not really sure why it is har
by darylteo 13y ago
I'd argue that MVVM is a subset of MVC. So technically they're accurate.
And also, anything that is "badly done" becomes bad. I'm not really sure why it is hard to understand View Models... your controllers shouldn't define your view models. Your VIEWS determine what information is needed to render itself. Any templating engine that requires you to pass in a model (i.e. Handlebars, Jade etc.) is, in effect, MVVM. This makes your views more concise since it doesn't get access to a whole model when it isn't required. Its dependency is specifically only on the View Model itself.