Fast Boot "Shoebox": A means to serialize application state into DOM for consumption by the browser - #192
Merged
Conversation
Contributor
Author
|
@tomdale ok I'm ready for your 👀 now |
|
|
||
| {{content-for "body-footer"}} | ||
|
|
||
| <script type="fastboot/shoebox" data-key="key1"> |
Member
There was a problem hiding this comment.
Using id instead of data attributes will likely be faster
Contributor
Author
|
@danmcclain I've updated with your suggestions. thanks! |
habdelra
force-pushed
the
serialize-state
branch
3 times, most recently
from
May 14, 2016 18:32
fd3a370 to
3458a0c
Compare
| Ember.assert('shoebox.put is only invoked from the fastboot rendered application', Ember.get(this, 'fastboot.isFastBoot')); | ||
| Ember.assert('the provided key is a string', typeof key === 'string'); | ||
|
|
||
| let fastbootInfo = Ember.get(this, 'fastboot')._fastbootInfo; |
Contributor
|
This needs docs (at least API and probably guides on the FastBoot site) before we can merge. |
habdelra
force-pushed
the
serialize-state
branch
2 times, most recently
from
May 16, 2016 17:50
d2e0909 to
1c9737b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is to serialize and deserialize application state, so that application state can be passed between the fastboot rendered app and the browser rendered app.
Todo:
fastboot-express-middleware'sfastbootdependency to incorporate the PR above ^^ and bump thefastboot-express-middlewareversionpackage.jsonto use the bumpedfastboot-express-middlewareabove ^^In my local environment with all the
npm link's setup amongst all these dependent libs, all the tests are green. So fingers crossed that after all the dependencies above are completed the tests will be green.Do note, that in order to test retrieving items from the "shoebox", we need to actually run browser tests (not to be confused with the existing mocha server tests). To that end, I had to add a bunch of ember addon boilerplate (created from
ember addon) in order to establish the normalember testqunit browser tests--so that's why all the new files...