This talk covers the options for structuring concurrent Rails and Ember development, strategies for creating backend APIs that work well with Ember apps, and some innovative ideas around deploying your Ember and Rails apps into production.
apps, controllers make instance variables available to be rendered using ERB ★ In a Ember+Rails app, controllers instead serialize these “instance variables” into JSON and make it available to Ember to render 23
the client, am I doing double the work?” (cont.) 37 ★ As Andre Malan said, “Your front end is not your back end” ★ Your Rails and Ember apps have separate responsibilities. Duplicated work on client and server is unusual.
Ember controller?” 38 ★ A Rails controller is responsible for doing some queries or work and initiating the rendering of JSON or HTML ★ An Ember controller is more akin to a “view model” or “presenter” in Rails land. It is responsible for presenting bindable data to templates for rendering by proxying models and maintaining non-model state and computed properties.
Separate log-in page. Standard Rails cookie-based auth. (Must be on same domain.) ★ More complicated: Token-based authentication. Login with username / password, receive bearer token. Send bearer token in Authorization header with all API requests.