Delving into techniques to “bootstrap” my Backbone application, however I’m struggling to see how the suggested methods, like this one: http://ricostacruz.com/backbone-patterns/#bootstrapping_data, don’t just take the application a step back and tightly couple your API to your frontend.
I have a REST API and a backbone JS app, is the best solution to make a DB/API call in a serverside language and then output the JSON object directly into index.php (or whatever),
Is there a better solution for bootstrapping a Backbone application other than mixing in server side code into my JS app?
I assume by bootstrapping you mean the following scenario:
If this is the case, you have no other option but to render the initial data into your
index.php, or whatever you call the html document that loads the application. How else would it get there?If this is an unacceptable solution, you should try to optimize the loading by other means.