Live data from Hacker News

MVC is dead, it's time to MOVE on

cirw.in

141–150 of 233 posts

Re: MVC is dead, it's time to MOVE on

#141
Is there something structured like hacker news that focuses on articles with content like this? I find this a lot more interesting than threads about entrepreneurship but I don't know where to go to read about things like this.

Re: MVC is dead, it's time to MOVE on

#142
> but the problem with MVC as given is that you end up stuffing too much code into your controllers, because you don't know where else to put it.

What the hell is he talking about? Has he never worked with Fat Model™ design?

Re: MVC is dead, it's time to MOVE on

#143
"the "currentUser" model will emit an event to notify your application that it has changed"

That 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

#144
post #6

So 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.

... I'm pretty sure typical MVC uses some form of event as well, i.e. an event is created to inform the view that the model has changed. (Even the wikipedia page differentiates passive MVC implementations where the language/platform cannot implement events.)

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

#145
post #66
post #49

Earlier 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…

Somewhat pedantic, but just throwing this out there: cars, bikes, and boats are all forms of transportation which can turn. They should probably inherit the concept of turning left, and then specify the exact meaning in their context.

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

#147

Are 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…

In practical terms, those observers would have to live in the controller, or there would be coupling between the model and views.

Re: MVC is dead, it's time to MOVE on

#148
post #134

Earlier 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.

If you're so keep on giving a different meaning to already defined standard why not use some other abbreviation, say MRC (R for Representation)

Re: MVC is dead, it's time to MOVE on

#149
post #82

MVC, 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…

Yes ideally, controllers don't do anything than react to events, change model and update the view. In practice Controllers can get quite fat. It's a bit like Thin client/Thick Client in Client/Server environment.

Re: MVC is dead, it's time to MOVE on

#150

Earlier 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.

Bullshit. Please show me your Rails-or-similar app that's doing INPUT parsing in the view (embedded JS doesn't count)
Post reply on HN