Friday, April 3, 2015

Model Widget Controller (MWC) a.k.a.: Apple “MVC” Is Not MVC

Marcel Weiher (tweet, comments):

As far as I can tell, this architectural style comes from having self-contained widgets that encapsulate very small pieces of information such as simple strings, booleans or numbers. The MVC architecture was not intended for these kinds of small widgets […]

With a widget, there is no complex model, not filtering being done by the view. The widget contains its own data, for example a string or a number. An advantage of widgets is that you can meaningfully assemble them in a tool like Interface Builder, with a more MVC-like large view, all you have in IB is a large blank space labeled ‘Custom View’. On the other hand, I’ve had very good experiences with “real” (large view) MVC in creating high performance, highly responsive user interfaces.

Update (2015-04-06): Martin Fowler (via Hacker News):

Probably the widest quoted pattern in UI development is Model View Controller (MVC) - it’s also the most misquoted. I’ve lost count of the times I’ve seen something described as MVC which turned out to be nothing like it. Frankly a lot of the reason for this is that parts of classic MVC don’t really make sense for rich clients these days.

1 Comment RSS · Twitter

[…] Previously: Model Widget Controller (MWC) a.k.a.: Apple “MVC” Is Not MVC. […]

Leave a Comment