The Case:
One page app that display first time all items.(Use backbone.js + some mvc framework like rails)
What should index action render or how its should be build (if have some good article about that or/and live example please add it)?
Option 1 - (Problem: a. 2 HTTP calls b. more slow render):
a. index action render index view without data
b. call to getData action that send json with data and backbone insert them to models etc..
Option 2 - (Problem: a. 2 HTTP calls):
a. index action render index view with data
b. (only for sync backbone) call to getData action that send json with data and backbone insert them to models etc..
Option 3:
a. index action render index view with data
b. backbone view update the models etc..
thanks