How to architect my backend for an ambitious ember app

I imagine a lot of you have seen http://www.bustle.com/. It’s probably the best engineered ember app I’ve seen yet. I have a few ideas floating around for apps based on a similar theme and I was wondering how you would architect the back-end. I’m going to be using rails so that’s the only requirement.

Should I use rails and the active model serializer gem to build the API? Is there a better way to build an api and serve json to ember? I apologize for my ignorance, but I’ve never built an API of considerable size and I’m not sure how to go about it.

In short, how would YOU build a rails API and serve that data to ember?

1 Like

I would use active-model-serializers as you mentioned. Depending on whether or not you need to support non-api access I would use the rails-api gem if you can. It removes a bunch of unneeded middlewares, and generally speeds up the response times if you don’t need to render asset pipeline or view type stuff.

Most of my apps have a heavy authorization context so each request would have to deal with that (most likely via a token for each request). Not sure if that is an issue for you or not…

One of the best written Rails API / Ember combinations that I’ve seen is Discourse. There’s definitely a ton that you can learn from the source to accomplish what you’re trying to do both on the server and client side.

I appreciate all of your responses. Does anybody have any experience with ember-restless, https://github.com/endlessinc/ember-restless? Curious to know if there’s a verdict out on it yet.

I miss you, johnernaut.

Old post, but for those curious, we built bustle.com using a Rails API and ember-restless.

1 Like