You know it's nice reading a criticism of something that has an alternative solution offered rather than just going "hey MVC is terrible and you're an idiot for using it". I do however think there's still great benefits to MVC, if you're shovelling code into controllers and can't make it work like it should then MVC is not the right design pattern for the project. Like every other pattern it'll only work when it work…
MVC is dead, it's time to MOVE on
171–180 of 233 posts
Re: MVC is dead, it's time to MOVE on
#172Earlier quoted context omitted.
Bullshit. Please show me your Rails-or-similar app that's doing INPUT parsing in the view (embedded JS doesn't count)
When you click a link on a web page, it gets routed to a controller action. Thats done because the link was generated with the url: example.com/controller/action. Its not about parsing input, its about routing.
Re: MVC is dead, it's time to MOVE on
#173Doesn't address any of the actual issues with writing an MVC web application.
MVC -> Views are templates, Controllers are HTTP server end point bindings and Model is everything else.
Rookie mistake; put logic in controller actions. No! This is a terrible idea: your controller should never do more than: parse input, apply update to some model object, generate response view model.
'Model' does not mean 'Something that serializes and goes into a database'. It means everything else. The entire state and associated classes that manipulate that state. That's where these operations from MOVE exist.
I mean, if you want to critize MVC (especially some popular frameworks...), go for it, but I'd be much more interested to hear how a new approach addresses:
- What about all that javascript / flash / etc? Where does that fit in?
- How do you effectively test controllers and views?
Re: MVC is dead, it's time to MOVE on
#174Re: MVC is dead, it's time to MOVE on
#175Earlier quoted context omitted.
Bullshit. Please show me your Rails-or-similar app that's doing INPUT parsing in the view (embedded JS doesn't count)
When you click a link on a web page, it gets routed to a controller action. Thats done because the link was generated with the url: example.com/controller/action. Its not about parsing input, its about routing.
Re: MVC is dead, it's time to MOVE on
#176You know it's nice reading a criticism of something that has an alternative solution offered rather than just going "hey MVC is terrible and you're an idiot for using it". I do however think there's still great benefits to MVC, if you're shovelling code into controllers and can't make it work like it should then MVC is not the right design pattern for the project. Like every other pattern it'll only work when it work…
MVC is terrible for web apps (in the original local GUI domain it's fine for some things), you aren't an idiot for using it because you're probably not actually using it but rather only something loosely inspired by it, and the solution is simply DRY. MVC at its best is simply one manifestation of DRY, but there's no real reason to get too stuck on it when with practice DRY is something you should just always be doin…
Server MVC (Model2) is not the same as client MVC (the classic one). They are totally different architectures. Patterns that apply to one, don't apply to the other.
You can't get MVC with Rails/Django/Struts. You can get a nice MVC with a Single Page Application or with a desktop app.
A similar discussion was already here: http://news.ycombinator.com/item?id=3035549
Re: MVC is dead, it's time to MOVE on
#177For the web, I find Lift's "View-First" setup much compelling, and easier. The issue I have with traditional web-framework MVC is that it assumes that each URL associates with one controller, which I've found to be very straightjacket-esque. Often the pages I'm building have many separate bits of functionality present, from simple stuff like a login box, numerous widgets, and then the main thing the page is about. In…
Also, Twitter's recent 180 on shifting some processing from the client back to the server [1] suggests a server-oriented framework like Lift's is worth considering, despite the hype and excitement around client-heavy Rich Web Apps. Lift does the API-consuming rich client model as well, but its uniqueness is the DOM transform stuff.
Very different mental model than MVC and hard to get started with for some because of that, but here's a great bit of advice on best practices I came across recently (especially the part about pretty everything being done via either LiftRules or the S object) [2].
1. http://engineering.twitter.com/2012/05/improving-performance...
2. http://www.quora.com/Lift-web-framework/What-are-the-best-pr...
Re: MVC is dead, it's time to MOVE on
#178There is no MVC. A design pattern is a reusable solution to problem, given a certain context (set of constraints). My design pattern study group iterated over the Gang of Four book 3 times, please many others. The MVC sessions were the least constructive. No two people could agree on what is and isn't MVC. Or MVP. No, you're not doing it right. Oh, MVC can only be done "correctly" using Smalltalk. Yadda yadda yadda.…
Martin Fowler has an excellent write up on the history of MVC and related patterns (and resulting confusion) in http://martinfowler.com/eaaDev/uiArchs.html.
Re: MVC is dead, it's time to MOVE on
#179Of course, MVC was developed and popularized on Smalltalk.... which had both of these notions...
Re: MVC is dead, it's time to MOVE on
#180For the web, I find Lift's "View-First" setup much compelling, and easier. The issue I have with traditional web-framework MVC is that it assumes that each URL associates with one controller, which I've found to be very straightjacket-esque. Often the pages I'm building have many separate bits of functionality present, from simple stuff like a login box, numerous widgets, and then the main thing the page is about. In…
Second that about Lift too. It's basically server-side jQuery. Instead of parsing templates as one big string, it does DOM transforms on sub-trees. Parallel, independent, lazy-loading transforms using an Actor for each for each Snippet/subtree. Really awesome model. Also, Twitter's recent 180 on shifting some processing from the client back to the server [1] suggests a server-oriented framework like Lift's is worth c…