开发者

Collection usage in BackboneJS

Which is better to use the collection:

  1. Collection contain the total list of data, and include a function to select the the part of data show in view. Lots of data should be loaded in client side.

  2. Collection only 开发者_高级运维contain the data to show in view. In this way, require to fetch data from server more frequently. And the data to show in view is selected on server side.

Any suggestion?


It depends on the size and sensitivity of the collection, but in general I preference proxying requests to the server-side, and storing only the view/cache data locally. It will serve better in the long-run.


If you have tonnes of data, best solution will be to load it on demand.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜