5 ms·
I'll tell you one thing that I do not doubt. The splitting of the M, V & C is far better than bundling them in one page. I'd take a crap MVC design over the pr
by mattmanser 13y ago
I'll tell you one thing that I do not doubt. The splitting of the M, V & C is far better than bundling them in one page.
I'd take a crap MVC design over the pre-MVC stuff I worked on any day of the week.
The thing you don't seem to be saying is what you're doing instead? You're just waving hands at the moment and saying it's bad, but it used to be much worse.
- mattgreenrocks 13y agoIt's still the wrong approach to the problem. Desktop app UIs were never this painful. Even Swing's.
- endlessvoid94 13y agoThat's a really good point.
- king_magic 13y agoDesktop app UIs were never this painful? WPF, WinForms, WTL, MFC... all could be pretty darn painful when you got beyond the basic Hello World examples.
- AnimalMuppet 12y agoInterestingly, MFC was painful at least partly because instead of MVC, it wanted to drive you toward a Document/View architecture, where Document had both Model and View. This was painful exactly because of some of the problems that MVC was designed to fix.
- ollysb 13y agoYeah, enough with the hand waving. I can't say I've ever experienced any pain using MVC for web apps but I'm very happy to be enlightened. Let's see the side-by-side code examples (or if someone can can at least explain what they're doing instead I'll have a crack at it :) ).
- benjaminpv 13y agoSolid copy on this. I'm under no delusions that MVC is The One True Way to handle architecting software, but I'll take it over joining a bunch of strings to generate a web page. I'd say anyone upset over MVC's leaky abstractions could better funnel that energy spent into making something better but I can't help to think that no software project is ever going to so neatly conform to having a structure imposed upon it.
- mattgreenrocks 13y ago> I can't help to think that no software project is ever going to so neatly conform to having a structure imposed upon it That's the problem with prescribing an architecture ahead of time. That's why you learn the basics and improvise/draw on established architectures as the project evolves.
- pgeorgi 13y agoA good counter proposal to the "typical" server-side web architecture is seaside (www.seaside.st). Its tutorial (A walk on the seaside on http://seaside.st/documentation/tutorials http://seaside.st/documentation/tutorials) is rather basic, but shows the concepts well. (edit: longer article http://book.seaside.st http://book.seaside.st) Of course it has a different set of quirks to get used to, so it's not a cure-all - but it gives a different perspective on web-things.
- josephschmoe 13y agoAgreed. MVC is vastly, vastly superior to what people, especially inexperienced programmers, "naturally" seem to do - which is to dump their models into their views.
- richroc6 12y agoOk St. Joe... Perhaps you should google "Martin Fowler empty bags of getters and setters" for a dose of real domain model justification. There are too many outright false assertions in the MVC camp. WebForms encourage mixing code and markup? Actually, they fairly obviated that practice which slowly JIT compiles into the crappy GUID-name microlibs now predominant in Razor CSHiTMeaL views. Much easier than viewstate and page lifecycle? Only if you call the necessary AJAX, LINQ, and routing trivial. In all of the examples I have seen, ASP.NET MVC views only route back to a single controller, which makes them pretty tightly coupled, thus no better than web forms. I pity the "inexperienced" programmers subject to your review.
- jerf 13y ago"The thing you don't seem to be saying is what you're doing instead?" DRY. Just, DRY. If DRY leads you to MVC, rock on. But DRY is the real thing. It isn't a framework, and you have to think about it. But it's what you're really trying to do. You're trying to define yourself the win by imputing to me a motivation to go "back" to crappy design. It's quite disingenuous, since I just got done complaining that MVC is often a crappy design, and logically concluding from that that I must want crappy designs is ludicrous once I call it out. And if you further feel inclined to say "But you didn't give me an answer!", well, the need for "one" answer is part of the problem. There isn't one answer for which design structure will lead you to the DRYest design. Sometimes it'll be MVC. But you have to think. Not just knee-jerk MVC and think you've "designed".
- DonHopkins 13y agoThe whole idea that all problems can be broken up into three different essential concepts that you can describe with a TLA seems like a throwback to the Christian doctrine of Trinity: the Father, Son and the Holy Ghost. They're one God in three persons, monotheistic polytheism! Monolithic polymorphism! People seem to think that if you dress software architecture up in the trappings of religious dogma, then it's easier to evangelize and recruit people to your cause. Well maybe they're right: it kind of worked for Larry Wall, for a while... It usually turns out that there are more like 17 different essential concepts that you need to get a complex software project off the ground, but 17LAs like MVPATQSDYKRFXZFHW aren't as catchy, and are too hard to remember and pronounce, so they end up cramming everything that's not obviously M or V into the kitchen sink C. DRY is great, but you should also DRTMOTP: Don't Repeat The Mistakes Of The Past!