Documentation for DS.ActiveModelAdapter is exists only for 1.13 (for 2 - 404: https://api.emberjs.com/ember-data/1.13/classes/DS.ActiveModelAdapter So, it looks like it's moved out from DS: https://github.com/ember-data/active-model-adapter
We have ember-data 2.13.2 and it's working fine with active-model-adapter
But we got some issues with the bump to ember-data 2.14.11 with nested behavior
The big issue here is to rewrite the backend part. We also may use RESTAdapter: https://www.emberscreencasts.com/posts/113-restadapter-vs-jsonapiadapter-vs-activemodeladapter but it looks like ember way is JSONAPIAdapter way: https://api.emberjs.com/ember-data/release/classes/JSONAPIAdapter
So, generally, the question is: what way is better for ember-upgrade?
- keep backend API and maintain active-model-adapter
- rewrite backend API and migrate to
JSONAPIAdapter
(with data/relationships approach) - rewrite backend API and migrate to RESTAdapter
- keep backend API and implement custom serializer to change on the fly input/output to use JSONAPIAdapter or RESTAdapter (pick best) logic on FE (maybe it's some crazy way, but it's just to ask)
Note: backend API on RubyOnRails
Aucun commentaire:
Enregistrer un commentaire