Where should I define a `save` action?

When comparing to Rails the naming sounds completely different but the concepts seem to map fairly well (at least in my understanding):

Router.map == routes.rb
Route      == Controller
Controller == Decorator
View       == View (Template + jQuery)

I mentally map it to a “page” in Rails having 1 Controller (route) that pulls all of the necessary data together to pass off to various decorators (controllers), each responsible for building one part of the final page.

When it comes to nested routes in Ember, that is the same as having nested layouts in Rails, albeit with each layout having it’s own controller/decorator with the necessary data passed in for you.

It’s probably not entirely accurate but it certainly helped me grok Ember architecture when I first started, maybe it can help someone else too!

1 Like