Settings

Theme

Beginning Ember.js on Rails: Part 2

cerebris.com

65 points by dgeb 14 years ago · 7 comments

Reader

lackbeard 14 years ago

I wonder why Rails was chosen for the backend.

Naively, it seems like a bit of overkill. You don't need a full stack web app framework to create REST endpoints, right?

  • dgebOP 14 years ago

    If I were writing this particular app as anything other than an example, I agree that Rails would be overkill. However, I wanted to provide a starting point for Ember/Rails apps that are much more complex. For instance, I wanted to illustrate use of the ember-rails gem, structuring ember files in the asset pipeline, merging handlebars templates in ERB, etc.

  • cobrabyte 14 years ago

    I can't speak for others but I'm building a Rails app that could benefit from an Ember front end for a small subset of the full app. This series shows how easy it would be to 'plug in' Ember into a much broader Rails app.

    If you're truly building a one-page style app, Rails is, as you say, probably not your first choice. Sinatra maybe?

    • Argorak 14 years ago

      At the danger of plugging it everywhere: if you skip the "view-helper" part of Padrino, its a pretty good backend for sproutcore/ember (I use it as such).

  • evilduck 14 years ago

    It's an easy way to abstract away that bit of the tutorial. Rails makes it absolutely trivial for the purpose of setting up an Ember.js example if your focus isn't on the backend itself.

    Rails scaffolding creates RESTful resources by default (and Ember.js plays nicely with it too). Starting from a "blank slate" Ubuntu server install, you could have a dev server providing this groundwork in about 7 commands in under 5 minutes. If you were to do this in J2EE (nothing is stopping you), setting up the backend would take significantly longer than the frontend ideas being explained.

  • kanja 14 years ago

    Because ember-data supports the rails url scheme with no extra work. It's a little overkill, but they feel that they'll catch more users up front this way.

  • adelevie 14 years ago

    You could use Parse.com.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection