I’m moving into realtime applications and trying to stick with RoR where possible. My proposed stack is something like:
- RoR
- Eventmachine w/ fibers
- Backbone/ember
The trouble I am having is regarding the data persistence. Ember uses EmberData, but can or should this be used in conjunction with ActiveRecord? How would the data persistence layer work in the above application? Does EmberData directly access database? Would I have to mimic model mappings in both EmberData and ActiveRecord?
Excuse the ignorance, I have been searching, this is just all new to me.
Have a look at this
http://reefpoints.dockyard.com/ember/2013/01/07/building-an-ember-app-with-rails-api-part-1.html.
There are 3 articles.
Ember.js is an MVC front end framework, it cannot get direct access to your database. It communicates with rails through an API your app exposes.
Also https://github.com/dgeb/ember_data_example