Confusion over shoebox, fastboot and ember-data
See original GitHub issueThis is a pretty open-ended issue created after a chat with @kratiahuja on the fastboot slack channel. Not sure on the best format for this since it’s pretty vague, but hoping to kick off a chat.
Currently, implementing fastboot with shoebox support is a bit tough when pulling ember-data into the equation. The reason is because you have to keep 3 states in mind for each route transiton
- Fastboot
- Non fastboot same model
- Non fastboot different model
The issue stems from the idea that that the shoebox is a pretty basic API allowing you to handle rehydration of your apps on your own. There are a few projects out there right now that are looking at ember-data hydrating instead of ember, but they kind of miss the mark as well. The reason is because ember-data will still issue network requests for query calls or really anything outside of a direct find
request.
To make this work, it seems like ember-data and fastboot need to work much more closely together.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (8 by maintainers)
Top GitHub Comments
I’ve done simple proof of concept here: https://github.com/appchance/ember-cached-shoe. This add-on simply saves AJAX responses in the shoebox on the fastboot side and retrieves them in the browser. No more duplicated requests. Maybe you will find it useful 😃
Yeah. Let me think more on this during my week commute. I am pretty sure we can come up with something of a declarative API that makes this better (now that i imagine it more, it is isn’t as user friendly). We should probably jump on a hangout to discuss sometime once we have clear ideas hashed out.