MVC is dead, it's time to MOVE on
71–80 of 233 posts
Re: MVC is dead, it's time to MOVE on
#72Maybe I don't understand MVC, and you all can tell me How Wrong I Am, but here's how I understand MVC at present:
Your Model is a public API, a Service Gateway -- and it should do a couple of things in principle. The first is that it should be able to manage a list of subscribed view/controllers, and push updates out to them -- this was difficult with Web 2.0 but we're now moving to systems where this is considered normal. The second is that it should define a set of API commands which change that state and push out those subscriptions. That second bit is crucial, it's the difference between writing assembly and Python. If you have logic in your controller then it's probably because your model does not expose certain high-level concepts which your controller would use directly, so you're taking data from the model and building a higher-order model in your controller, before you operate on it.
It helps me to remember that in Smalltalk the idea was to always have pairs. They were always the same object split in two; each view had its own controller and vice versa. The controller is supposed to be input-oriented and the view is supposed to be output-oriented; the model says "hey, X changed" and the view updates what X looks like; the user clicks on X and the controller sends a signal to the view to change some more, the user erases X and the controller sends this request to the model, which will update the view when the request is complete.
Viewed this way it's really hard to see what the difference is supposed to be between MVC and MOVE. Clearly the messages in MVC are the Events in MOVE. Most of the controller logic has been pushed into the View, which should now handle input actions. Data cannot be dynamically pushed from the Model to the View because this is of course a Web 2.0 technology (pre-cometcasting, pre-websockets). The Operation sits in a grey area, implementing higher-order abstractions from the lower-order model.
Maybe we could do better with a hybrid, because the idea of decoupling subscriptions from the public API might actually be a good idea, in line with the Clojure philosophy that things should be de-complected into their simplest representations. But if I understand MVC right, then I don't see why you've got all your business logic in your controller. Heck, the View is supposed to be client-side, why isn't your Controller client side? Or if it is, and you have all this business logic in it, why are you trusting the client to do your business logic? Your gripes with MVC don't make sense to me.
Re: MVC is dead, it's time to MOVE on
#73Re: MVC is dead, it's time to MOVE on
#74Re: MVC is dead, it's time to MOVE on
#75Earlier quoted context omitted.
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…
I suspect this is because most people do not actually understand what MVC is and how it applies to server-client relationships; in fact, the wikipedia article on MVC is slightly off on the subject, assuming one accepts the original Xerox description as a source. Try not to wrap the entire complicated application into one big MVC umbrella because that will just confuse. There are actually multiple processes involved,…
People complaining about factual inaccuracies on Wikipedia annoy me. It's Wikipedia. The entire point and purpose of it is to fix what you know is wrong.
For once, I'd like to see, "I just touched up the Wikipedia article on this subject to explain it a bit more accurately."
Re: MVC is dead, it's time to MOVE on
#76Earlier quoted context omitted.
I suspect this is because most people do not actually understand what MVC is and how it applies to server-client relationships; in fact, the wikipedia article on MVC is slightly off on the subject, assuming one accepts the original Xerox description as a source. Try not to wrap the entire complicated application into one big MVC umbrella because that will just confuse. There are actually multiple processes involved,…
> in fact, the wikipedia article on MVC is slightly off on the subject, assuming one accepts the original Xerox description as a source. People complaining about factual inaccuracies on Wikipedia annoy me. It's Wikipedia. The entire point and purpose of it is to fix what you know is wrong. For once, I'd like to see, "I just touched up the Wikipedia article on this subject to explain it a bit more accurately."
Re: MVC is dead, it's time to MOVE on
#77I primarily use PHP, and have gotten in the habit of using a service layer to handle business operations. I've found that it's worked extremely well, and so far does not seem restrictive. It's let me clean up my controllers and models quite nicely.
It's been awhile since I've used the RobotLegs Actionscript framework, but its 'implementation' of the MVC pattern seems awfully close to MOVE.
Overall, I think the author makes a good case of how to improve MVC application development, regardless of whether the name should change or not :)
Re: MVC is dead, it's time to MOVE on
#78You 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…
Honestly I'm sick of reading all those "x is dead"-alike articles. Hey, if you believe the web PHP is dead, Java is dead, C is dead.. etc... Technologies, patterns, languages or structures don't die, in fact, if you really fancy you could write your application using C code and compiling it into asm, why not? If it works, perfect! There are enough examples out there where old technologie works. And I think people tend to be spending too much time thinking why something is imperfect, or how to do it better, instead of actually making stuff that rocks.
If you really do have the need to improve something, prove it! Make a useable example, write a framework, library or new language if you really need to.
Re: MVC is dead, it's time to MOVE on
#79Re: MVC is dead, it's time to MOVE on
#80That's a good thing, though. They're at the verge of rediscovering SOA now and there's hope this incarnation will be less plagued by IOC-fluff and boilerplate, simply because the involved people have more of a hacking and less of an engineering background.
I, for one, am looking forward to the "great shattering of Rails".