Monday, 7 May 2012

MVC, MVP, MVVM...

One of the few things everyone should agree regarding MVC is that it can mean many different things. An additional problem, is that depending on whether we're trying to implement it (purely server side, purely client side or mixed) some ideas can not be applied. For example, a client side Web controller can not subscribe to a Server Side Model (well, unless we're using Comet, WebSocktes or the likes).
If we add related patterns to the mix, like MVP and MVVM, the confusion and concepts war grows bigger and bigger. I'd like to think of this entry as an open one where maybe some day I'll publish some personal conclusions (if I ever have ones that are worth to share...) but by the moment I'll have to make do with pasting below links to some of the best articles that I've read about this lately.

So far I will say that I don't fully understand all the hype around MVVM JavaScript frameworks. I'm mainly doubtful about the data binding between the VM and the View. On one side, most samples I've seen so far are rather trivial, and on the other side I feel much more comfortable with a MVP approach, with the Presenter telling the View what to do in a generic way (showEmployess, preventEditions...) that different views could implement in a completely different way (a grid, a html list, hide or disable...)

No comments:

Post a Comment