by heyitsnick ยท 13y ago ยท 0 comments
I switched to Backbone and got going right away, in half a day of reading the docs and watching a couple of peepcode videos and I was off and didn't look back.
Maybe the Ember docs have improved in the last couple of months but at the time it was just a non-starter for me.
edit: I believe the issue was around Ember Data/REST. Out of the box it didn't support polling data on a REST interface, which seemed absolutely critical/fundamental to a JS framework. I found a plugin I believe called Ember Data, but documentation was very sparse and I couldn't even get a simple example going. This is going on memory so this could be slightly wrong or different today.
It's easy to get frustrated with ember & ember-data and just jump ship to backbone, but you'll be paying for it later when your data model expands beyond 5 interconnected models.
The best advice is to tough it out with ember even if the docs are weak and tutorials are sparse.
See, that's the problem. How do you get to "up and going" if the docs are sparse?
Just to be clear, this is not meant as a criticism of Ember, just a general observation that I have made time and time again when looking at new projects and reading comments saying things like "yes, X is not documented and hard to get into but once you get up and going it's all roses"
Not saying it hasn't been bad historically, just that it's getting better and will be good in the future.
So why is that? This was my big head-scratcher with Ember; surely the access to a data layer is the whole point of these javascript frameworks? I mean all backbone is really is a layer between REST and client-side javascript. I guess i'm missing a whole class of JS applications that don't need access to a server-side data layer, but for me that's the fundamental reason to be looking for a JS framework in the first place. So to come across one so highly regarded which doesn't have it baked in was very jarring.
It's not 'baked in' because Ember is modular: Ember-data has all of that layer in it, so the rest of Ember doesn't have to care. That said, I disagree with your parent: you shouldn't be writing your own data layer.
But ember shines in other areas that people wont care about until they have to write single page web apps with a high enough complexity that warrants it. The reason we ditched gwt for ember was the 2 way bindings. Not having to write all that stuff(and test it(in every browser))has been a productivity boost, even though we had to plugin our own persistence layer.
Still, once we've learned Ember we're very happy with it. Backbone is just too small to start any medium/large app, and Ember has a decent community behind it and lots of integrations with Rails.
The hope is to make it awesome for other JS frameworks too, but we mostly build Ember apps ourself, so you start with what you know...
Also you should look into active model serializers for integrating rails with ember. I think it's yehuda Katz' preferred method for Jason serialization from rails to ember.
That is true. AMS + Ember-data = ๐ (I'm now maintaining AMS, but Yehuda and Jose Valim originally wrote it for this purpose.)
Exactly.
I don't want to feel "lost and overwhelmed" when trying to learn some new product, or having to Google every single thing. It is a wonder anything ever gets done. Seems these things are written by someone in their ivory tower without any forethought to documentation. "Someone else wants to learn it? Not my problem! I developed it, so there! No good documentation for you." That is just lame.