After reading your recent blog post about EmberJS, and given your experience with Backbone, I was wondering: which kind of apps do you consider a better fit for each framework?What kind of features, UIs, constraints, workflows, etc make more pleasant to develop with Backbone vs EmberJS? What criteria would you apply before deciding which framework to use in your next Rails + JS app?
I personally prefer Angular over Ember for larger applications. I’m not a fan of several of Ember’s design decisions (it has its own object model, it monkey-patches Function#prototype, etc.), and several pieces of Angular (mainly how it handles templates) fits more nicely in the Rails stack.
I think that trying to think of ember as a single page app is the wrong frame of mind. One of the most powerful features about ember is it’s router and use of the URL.
As the homepage states, its for building ambitious web applications. Like rails, it’s opinionated and getting started can be frustrating. There is an Ember way to doing things and going against that leads to a lot of heartache later on in development. There’s a steep learning curve, but there is gold at the end and I think it’s worth working through.
Thank you both for your comments! I see… would you recommend Angular or EmberJS for an app where only some pages have JS-based UIs, or that’s a better fit for Backbone, even if those individual pages are highly interactive and stateful? How easy would be switching from a Backbone-based app to an EmberJS one? If you’re launching a prototype you know you’ll be iterating a lot and don’t know what the app will end up looking like… In such cases I always feel comfortable with Rails in the server side, but I’m still kind of lost when it comes to choosing a client-side framework.
As an aside, what about testing – have you noticed any major differences between both frameworks?
In the case of having a couple of pages that need the interactivity of a single page app I would say go with backbone or sprinkle a little jquery and stick with turbolinks.
I haven’t really used ember. When it hit 1.0 I played with it, got frustrated by the docs and gave up after an hour. I have been told that the situation has improved but haven’t yet gone back.