Hacker News new | ask | show | jobs
by joshuahornby 3509 days ago
I'm a big fan of Ember, although a word of warning: To get the most out of Ember you should follow the Ember way of doing things, we found our selfs wrestling with Ember data, and APIs that don't follow standard responses (this is to be expected mind)

Still a great framework for large web apps.

3 comments

I agree with this in principle, and I feel the same way about Rails (also heavily convention-over-configuration). But do you also dasherize the JSON keys in your server back-and-forth, as recommended by JSONAPI? That strikes me as such a strange recommendation. It is incompatible with Rails parameter handling, and it prevents them from being Javascript identifiers also. I don't get it!
> APIs that don't follow standard responses

Interesting. In my experience the clean separation of layers in Ember-Data (network, serialization, models) make it quite suited to non-standard APIs. I found writing a custom (de-)serializer for a non-standard API to be relatively easy.

Care to elaborate on what were your issues precisely?

Not OP, but it's possible to not write any ember-data code if a server implements json-api...

Otherwise, you have to write the same code that you have to write in other places... except that w/ Ember Data there are core patterns and its easy to add tests.

Writing Ember against an API that speaks json-api is a magical experience :-D

So happy to hear JSON API is working that well for you :)
Also curious about this. For reasons that our team was personally against, we had to devote some serious upfront development work to building an integration with a WordPress backend and the rest of our Ember front-end (which consumed, thankfully, a JSON-API spec backend). We wrote custom adapter and serialization layers for this, which was trivial; the only exceptions to the ease of writing such code was when the WordPress developers would return bizarre status codes or missed root objects or some other such nonsense.
what do you mean it doesn't follow standard responses?