Earlier quoted context omitted.
The original MVC architecture was for GUI interfaces in Smalltalk. It was so helpful a design pattern it was borrowed for use in request/response web application, where naturally the use of each part was very different. If you really want to "get" the original MVC, see the classic book "Smalltalk, Objects, and Design" [1] which explains MVC and other OO architectures as well as the principles behind them, which might…
My original implementation of Mvc was writing a game of connect 4 in java. There was a board model. There were two views. One graphical, and one command line. You could update both views by clicking your next move on the graphical board, or putting input on the command line. Once the model was updated, the controller would update any view that was listening on it.
MVC is dead, it's time to MOVE on
181–190 of 233 posts
Re: MVC is dead, it's time to MOVE on
#182Earlier 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…
> MVC is terrible for web apps Can you expand more on this? I've used MVC for webapps quite a bit, and find it to work well.
You haven't used MVC, you have probably used Model2. The post we're discussing is about MVC.
http://andrzejonsoftware.blogspot.com/2011/09/rails-is-not-m...
Re: MVC is dead, it's time to MOVE on
#183So you renamed "controllers" to "operations".
It splits controllers into operations and events. Out of the three terminologies (state, representation, flow), the third one is arguably the most tangled. I find it healthy to refactor it into reusable chunks (operations) and event-driven flow management. The problem was, in my opinion, that operations should have not been put into controller units. It attracted more copy-paste solutions in my experience.
The original MVC designs and sample code all had views and controllers observing models through an Observer based event pattern.
The operations were the controller units. The events were not.
Re: MVC is dead, it's time to MOVE on
#184Earlier quoted context omitted.
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.
HATOES says that your XML/JSON/whatever needs to have those same links. What is the difference between an link in HTML and a { action_url: "" } property in JSON?
[1] Although were talking about Model 2 here, so thats irrelevant. Come to think of it, this whole discussion is pointless: we're arguing about whether views in a Model 2 architecture are proper MVC views...
Re: MVC is dead, it's time to MOVE on
#185Earlier quoted context omitted.
Im having a time parsing what you mean. Are you saying a car should not turn left, and that a controller should turn the wheel left? Please clarify
... it was a roundabout way of explaining how right you were, or at least in my initial reading of it. I see thing which is called a Car, an instance of which is stored in the Model, which may contain other things, including other types of Transports. The user interacts with the View, instructing a left turn - the controller grabs the Car (why it grabs the Car, and not the Bike is undefined =), and tells it to turn l…
Re: MVC is dead, it's time to MOVE on
#186Re: MVC is dead, it's time to MOVE on
#187There 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.…
There is MVC. Its just a concept, unlike those design patterns from GoF which are specific. Models are just data, View are just representations and Controllers are just endpoints. You can program your own way in your language, and if you can categorize your code as such, you can argue it is MVC. And of course, because its just a concept, anyone in the world can argue why your implementation is not MVC as well. No, MV…
Sure they are.
Spring is the Java community's effort to get some of that dynamic programming goodness (ahem).
Rails is the Ruby community's effort to reproduce the unmaintainable mess of J2EE.
You couldn't have one without the other.
Re: MVC is dead, it's time to MOVE on
#188Eventing is HORRIBLE. Regardless of the source, but models especially are not the place to be firing events.
This was all tried years ago. Before writing an article purporting to replace a foundational concept in application development maybe do a little more research into what the actual practical solutions to these factoring problems are.
Re: MVC is dead, it's time to MOVE on
#189There 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.…
You are right, MVC means different things to different people, so whenever someone says "MVC" I try to stop them right there and ask to explain what exactly they mean before proceeding any further. 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 .
I've written a direct manipulation vector structured graphics program. Think FreeHand / Illustrator with a scenegraph. I tried every which way to make something MVC esque. No can do.
I believe, but cannot prove, that the MVC failing(s), eg tight coupling, unclear flow of control, comes from the Observer/Listener like message passing between the players.
Further, I believe some future UI paradigm will be a hybrid, mutant love child, inspired by, of functional reactive programming and an VRML-97 like event model (FROM->TO style patchcord event routing). It's on my to do list, but I'm easily distracted and followed thru.
Re: MVC is dead, it's time to MOVE on
#190This sure looks like MVC, but they call the Controller "operations". The MVC abstraction has an issue with web applications, since the request-response cycle doesn't provide feedback as directly as the hardware-monitor-software cycle that the pattern was originally designed around. However, if the problem is that you are putting too much "logic" into your controllers, you should probably find a better place for it. I…
This article reminds me of Struts2 http://en.wikipedia.org/wiki/Apache_Struts MVC with "action" (or event, similar semantics). Speaking of Java/Spring-MVC approach, I tend to have a mix approach of Service and Repository (since DAO seems to be getting a lot of bad-rep, time to pick a new name :D). Controller -> Service (SOAP) or Resource (REST) [although Resource could simply forward to Service as well) or Controller…
If you want to just fake 'em all, which does not sound particularly ideal, people just generally mock em