|
|
|
|
|
by frontendbeauty
4886 days ago
|
|
Author here. So, yes, bootstrapping the JSON on initial pageload would be a lot faster than waiting for the Backbone.Router to fetch it (for the Rails + Backbone approach). But therein lies the problem I was talking about: to bootstrap the data for a particular URL, but to also have the client-side request the proper data for that URL in response to a pushState event, you end up needing to duplicate the mappings from app URLs to API resources on the client- and server-sides, and you need to be able to access the same API on both sides as well. We avoid this with Rendr by defining routes, controllers, models, etc in a way that can be run on both sides. |
|