ember-fastboot / ember-cli-fastboot

Server-side rendering for Ember.js apps
http://ember-fastboot.com/
MIT License
851 stars 160 forks source link

Move Ember Data FastBoot support to Ember Data itself #588

Open tchak opened 6 years ago

tchak commented 6 years ago

We are adding direct support for FastBoot in Ember Data.

https://github.com/emberjs/data/pull/5385

We will have two paths: jQuery.ajax which will require najax and a new, opt-in ember-fetch backend which have built in FastBoot support and do not require najax.

I don't think we can/should drop MonkeyPatch™ from ember-cli-fastboot right away because of support for older ED. But I am interested to hear what would be an acceptable time frame for doing it (@rwjblue)?

kratiahuja commented 6 years ago

I am not sure what the motivation is behind adding the patching in ember-data itself. It should be agnostic to all this. Please see my reasoning on your PR.

rwjblue commented 6 years ago

Ultimately it is odd that this addon is coupled in any way to ember-data. Ideally, fastboot provides capabilities that are used by other addons to get their jobs done. The current path (encoding non-fastboot addon logic in ember-cli-fastboot) is not scalable...

The ember-data team is working to move away from the $.ajax style of request (towards using ember-fetch), and having ember-data “own” this particular aspect makes it easier for it to massage the migration story.