3 ms·
Thanks for the suggestion! In fact, you've just described exactly what we're building. We are big fans of REST, and if you read the documentation, you'll see th
by tomdale 14y ago
Thanks for the suggestion! In fact, you've just described exactly what we're building. We are big fans of REST, and if you read the documentation, you'll see that the default behavior of Ember Data is to transmit RESTful JSON[1].
In addition, we've been working with a bunch of really smart Rails people like Steve Klabnik and Santiago Pastorino on projects like ActiveModel::Serializers[2] and rails-api[3].
That being said, we know that there are a lot of different ways to serialize and transmit records, so we've designed the architecture of Ember Data such that those decisions are encapsulated in specific objects which we call adapters. You can think of it like the adapters for different databases for ORMs like ActiveRecord.
The default adapter, though, is RESTful JSON, and is what we use in all of our applications. You can see the implementation on GitHub[4].
1: http://emberjs.com/guides/models/the-rest-adapter/ http://emberjs.com/guides/models/the-rest-adapter/
2: https://github.com/rails-api/active_model_serializers https://github.com/rails-api/active_model_serializers
3: https://github.com/rails-api/rails-api https://github.com/rails-api/rails-api
4: https://github.com/emberjs/data/blob/master/packages/ember-data/lib/adapters/rest_adapter.js https://github.com/emberjs/data/blob/master/packages/ember-d...
- anonfunction 14y agoThanks for the response! Only reason I mentioned it was that I didn't see REST anywhere in the linked article or here: https://github.com/emberjs/data https://github.com/emberjs/data