MVC is dead, it's time to MOVE on
141–150 of 233 posts
Re: MVC is dead, it's time to MOVE on
#142What the hell is he talking about? Has he never worked with Fat Model™ design?
Re: MVC is dead, it's time to MOVE on
#143That sounds like more than just wrapping knowledge to me.
Also, why do you absolutely want to fit everything into a framework? Or a pattern? Business logic goes into your domain models. Don't mix your business logic with your framework, that's about it...
Re: MVC is dead, it's time to MOVE on
#144So you renamed "controllers" to "operations".
And am I incorrect in seeing it as simply MVC with an events bus? Welcome to everything backbone.js already brought to the table.
Somehow, I'm just seeing the Observer pattern and the MVC pattern in the OPs post.
Re: MVC is dead, it's time to MOVE on
#145Earlier quoted context omitted.
Sorry, but data-bound events are not useless in server context. It might be exactly what we need when fat controllers go out of control. Perhaps you meant they are too much of a complication if taken too far to work across all concurrent requests? Binding data and behavior together breaks the rule of single responsibility, which I believe is far worse than designing separate roles in sepearate components that work to…
If "fat controllers go out of control" then you've already made multiple mistakes. I don't think re-inventing the wheel is the right approach to fixing a problem when the developer can understand their own mistakes instead of blaming a framework or architecture. Are you suggesting that OOP breaks the rule of single responsibility? Any 'operation' that modifies the internal data should belong on the model. Would turnL…
Obviously, I don't say "turn your handlebars such that the left side is closer to your chest," or "rotate your steering wheel counter-clockwise," when I mean to tell someone to turn left at the next intersection. I might, however, tell a sailor to steer to port at the next buoy. =)
EDIT: forgot to say, fwiw, that I agree that such actions do not belong in the model. The things go in the model, and the only actions the model should support are those relative managing the data in the model, not interacting with the data... That is, after all, what the controller is for.
Re: MVC is dead, it's time to MOVE on
#146Re: MVC is dead, it's time to MOVE on
#147Are you talking about pure mvc's like sproutcore? faux mvc's like backbone? model2 patterns like rails and most other server side architectures? I think what you mean is 'Model2 is dead...'. MVC is great for any environment where the observer pattern can be implemented (eg web front-end). The biggest problems I've seen in model 2 architectures is weak models. The side effect of this is everything gets stuffed in the…
Re: MVC is dead, it's time to MOVE on
#148Earlier quoted context omitted.
"A view is a (visual) representation of its model. It would ordinarily highlight certain attributes of the model and suppress others. It is thus acting as a presentation filter." Source: http://heim.ifi.uio.no/~trygver/1979/mvc-2/1979-12-MVC.pdf And you are not a human user, you are an engineer.
You keep using an appeal to authority, and I still see no value in the distinction. I am most certainly a human user.
Re: MVC is dead, it's time to MOVE on
#149MVC, more than other design patterns, is horribly abused. Developers should keep in mind its GUI roots. Here's my "is it MVC?" litmus test: How much of my code survives if I drastically change the view? For example, if I want to switch to a new desktop, web or text console interface, can I reuse much of the application? Of course, architecture changes this significantly (particularly web architecture), but still, if…
Maybe I'm doing it wrong, but I've always thought Controllers were supposed to be dumb and Models were supposed to be smart. That is, a model encompasses extracting the knowledge and turning into something that the controller passes to a view or another model, but is not processed much (if any) during the transfer. At most, it might be combined with data from other models into an uber-record that is passed to the vie…
Re: MVC is dead, it's time to MOVE on
#150Earlier quoted context omitted.
> JSON and RSS are just different methods for representing data to be communicated to other systems. We call those, "views".
In an MVC, the views are used both for output of the model and to map input back to the controllers. Without the input, its not part of the MVC pattern.