Sign in or Join FriendFeed
FriendFeed is the easiest way to share online. Learn more »
Bill de hÓra
Removing The Model-View-Controller Straitjacket - http://www.pointy-stick.com/blog...
"It really gets on my nerves when people write that Django is an "MVC framework". It's as valid as saying it's a "circus support mechanism", since the statement is both true, in some contexts, and false in others (you can definitely use Django-based code to help run your circus; stop looking so sceptical). " -Malcolm Tredinnick - DeWitt Clinton
Tredinnick (correctly, imho) breaks down the misapplication of the term MVC for web frameworks. He's not arguing against designs that separate the concerns, just that we tend to incorrectly call things MVC, and that's confusing. A keen observation of his: "If you read through those papers and the other presentations available on that page, you'll notice how the MVC pattern was very much tied into GUI systems." - DeWitt Clinton
+1 on this. MVC is poorly-defined enough (badly overloaded, actually) in normal GUIs. Whoever first abused the term to describe server-side web frameworks needs to be beaten, IMHO. - Joel Webber
I dunno; the style is rambling, incoherent, and muddle-headed. He can't even decide specifically what point he is trying to make. I was about fed up by, "here's where we bump into some of my problems with patterns. Or maybe just with Martin's particular method of describing patterns." This piece is sure to be popular just like a Heidegger piece was popular -- because one can interpret it to be saying any darned thing that one wants to talk about. - Joshua Allen
I have my own problems with MVC, but how am I supposed to take seriously a critic who keeps calling the web "asynchronous"? - Joshua Allen
@Joshua: Agreed about the author's style and rambling nature. My +1 is mainly meant to recognize the horribly confusing overloading of "MVC" to mean both the original Smalltalk definition and the weird "Web MVC" stuff they talk about in various web frameworks. The whole term needs to be retired, except for historical purposes. - Joel Webber
Joshua - how is the web not asynchronous? If anything, that's one of the basic tenets. I'm probably missing something obvious in your point, though. - DeWitt Clinton
big plus in the notion of "mis-applied MVC" when talking about Web apps. i see the usefulness of this handle but haven't yet come up w/ one that suits me better (bummer). - MikeAmundsen
How about Dispatcher - Logic - Data - Presentation? - DeWitt Clinton
(I tried a few iterations of the names, but the basic idea is that those four distinct and separable parts are present in just about every web app.) - DeWitt Clinton
DLDP... hmm... it's got possibilities. - MikeAmundsen
Data - Presentation - Dispatcher (to use the MVC order). do we need to express "Logic"? - MikeAmundsen
You're suggesting that the logic is the same as the dispatcher? I've personally found that I like to keep those two as separate as possible. - DeWitt Clinton
@Joel: Agreed; and the points about django are spot-on. Although I am sure many green programmers will now use this post to justify their use of crappy programming practices, saying "don't be so religious about MVC, dude" - Joshua Allen via fftogo
@Dewitt: yep - good pt. dispatcher def should be separate. esp. if you consider expanding the model outward to multiple servers, etc. - MikeAmundsen
@Dewitt: HTTP requests are synchronous, and worse-yet, user-initiated (i.e. can't perform "poor man's async" by polling). The fact that HTTP requests are synchronous is one of the most important characteristics of web architecture, and impacts how you design for scalability, state, and so on. The reason that techniques like Comet and XmlHTTPRequest.async were created is to get around this basic architectural limitation, and these techniques are still minority, and are somewhat ghetto. I think the author must have assumed that anything which isn't two-phase commit (as the web isn't) must be "asynchronous". The fact that he introduces the terminology while pointing out (correctly) that all web pages are by definition stale, suggests such a mental slip. But it's completely incorrect, and indicates a basic misunderstanding of the concepts involved. In fact, it seems that the author was using his own confusion about basic concepts as the primary proof of his assertion that the concepts were unclear and conf - Joshua Allen