Why is Ember getting rid of controllers instead of getting rid of routes?


#1

It seems like with most MVC’s, the router routes to a controller which grabs the model and passes it to a view, then returns the view to the browser.

But Ember is now shifting away from controllers and instead having us rely on routes for a lot of (if not all) the logic that the controller would typically handle.

Why not instead just get rid of routes and have controllers behave like a normal controller would? It always seemed odd to me that the route was responsible for grabbing the model instead of the controller anyway.


#2

that weird for me too. It should be routes , not controllers. or the current routes as controllers and then remove routes.


#3

What if I tell you it’s MVC that’s wrong? What if I tell you that Ember is not MVC, but RC (Route and Component)?

That is the direction that Ember is going. I don’t believe Ember claims to be MVC in any part of it’s documentation.


#4

Makes sense. That being said, ember started as an MVC framework with Routes crammed between the Controller and the Router. Then decided to scrap everything in order to keep the route, which is what I’m confused about.

You can call it a Route Component framework but it still uses models and (seems like) it behaves almost exactly like an MVC framework, the objects are just called differently. Again, I’m new to Ember but initially this is how I understand it.


#5

Ah, but “Model” is technically not part of Ember core. It’s part of the Ember Data addon that you are free to choose not to use.

Actually, from my experience of using Ember, starting out with Ember data can make your app a lot more complicated than it needs. The thing I found with Ember Data is that…not everything needs to be a DS.Model. If the object doesn’t (eventually) get an assigned id from the server, then it probably doesn’t need to be a DS.Model.

Ember Data is so complicated, it’s framework of its own.


#6

Not true tho. ember-data reduce a lot of complexity for everyday work and does a lot of house cleaning .

So lets call it (M)RC . I becoming to accept that M->C->V is wrong , it always should be M->R->Components(view+controller) , that makes more sense.