Tuesday, July 31, 2007

Roll your own MV-Something!

<rant>

It seems everyone is coming up with fishy definitions of MVC these days. (NB. I am borrowing Andrew's links.)

There are many variations. For a couple of years now, blogs and newsgroups have been all aflutter about MVC for the Web and how fabulous it is. There's a little fuzziness over the exact role of a Controller so some variants use other terms like Presenter instead and even rearrange the triad a bit. Great! So now everyone believes at least that eMMM Veee Something is the next best thing since sliced bread. Maybe there's hope for maintainable UI design.

The trouble is, there's misinformation floating around. There are dozens of Roll Your Own MV-Something frameworks. Some of them are quite good. Diversity is good but it's also harmful to discussion.

How do I explain to coworkers what MV-Something is about with all of this noise? MVC has acquired buzzword quality.

</rant>

2 comments:

Rob Conery said...

Dude, MVC is one of the most core, basic, and CS 101 architectural patterns there is. I don't appreciate the misinformation link - grow up and post something other than a bunch of ranting crap. Back up what you have to say - and don't ever tell me I'm spreading disinformation unless you can prove it.

This really pisses me off.

Jeff Brown said...

Rob,

I respect your effort in producing the screencast but what you demonstrated was very much not MVC. Don't try to tell me that a partial static class with a bunch of data accessors is anything like any of the common definitions of an MVC Controller from "CS 101". A Controller is an object tied to the View that specifies and mediates interactions between the View and the Model and delegates the handling of external events (such as clicks or HTTP GETs) to the appropriate components of the triad.

Don't kid yourself. MVC is not really "CS 101" material.

Even so, what you proposed is not even close to the best that can be achieved within ASP.Net WebForms. Projects like Igloo come to mind.

You are certainly achieving some separation of concerns but please don't confuse the issue further by calling it MVC! That is blatantly wrong and misleading and doesn't help anyone. If you don't like "Data Broker" then find a better name for what you've done.

Finally, if you don't like my ranting, go read Ayende's post instead. He's more level-headed about it: http://www.ayende.com/Blog/archive/2007/08/01/SonicCast-3--It-is-not-MVC.aspx