4 ms·
Well, the problem is that if you find Controllers badly defined in MVC, good luck in understanding how to use View Models properly. MVVM seems to me on many lev
by sklivvz1971 13y ago
Well, the problem is that if you find Controllers badly defined in MVC, good luck in understanding how to use View Models properly. MVVM seems to me on many levels a re-hash of the old Document/View concept, which is... not so good, because of coupling. And in fact, Many MVVM codebases end up being tightly coupled - bear in mind, also many MVC projects, especially of the ActiveRecord sort.
My comment obviously relates to my experience, which is admittedly more webby than application-y.
I thought iOS was inherently MVC though (or at least, that's what they claim)
- darylteo 13y agoI'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.