Reputation: 512
I have a fairly simple Rails 3.2 app deployed to Heroku, and I'd like to port it into Ember to cut overhead and streamline the app before I continue building it out further. Can anyone offer general guidance on how best to approach this to keep my existing Postgres user data intact?
I'm very new to Ember, and just getting started, but I'd like to start thinking specifically about solving this problem before I get too much further down the road.
FWIW, I'm vaguely aware of ember-rails (https://github.com/emberjs/ember-rails), but my current instinct is that I'd like to move off of Rails entirely to keep the app lean. Feel free to comment on why I'm wrong about that. :)
Upvotes: 1
Views: 154
Reputation: 1948
We've a Rails 4 app with a jQuery front-end and we're slowly adopting Ember. This is probably an open question without a single right answer, so I'll provide just some guidance.
First, I'll start by saying that Ember and Rails solve different problems. Ember isn't a Rails replacement, but rather part of a bigger system where Rails is one component, Ember another, just like your Database is another part. That said, using Ember simplifies and maybe removes the need to do certain parts in Rails, so there is some overlap. If you were to remove Rails, you will likely have to replace it with something equivalent.
Now a few ideas or approaches:
{{name}}
). Plan your models and use fixtures to get it all working. Create some controllers to add the flow and finally replace fixtures with calls to a new Rails API. Also, if you're using TurboLinks and can't disable it until you're on Ember, you will have to make sure ember loads properly on turbolink's page lifecycle. See TurboLinksHackForEmber
Upvotes: 1