Question

Are there any recommended libraries, patterns or examples on how to implement Prefetching and/or caching on a Backbone.Collection? For example, I have events I want to display in a calendar that has different view modes (eg. Day, Week, Month). I think it will be better to query the database/API once for say 1-3 months at a time to avoid too many network requests, even if I am in week view.

Then I think its beneficial to cache the received data (when the user constantly paginates, it will be faster), which is easy, but I will also need to somehow determine what to clear and at what point. In PHP there are PHP APC, XCache etc was wondering if there something similar in JS. Or do I do that on server side? For work, its a Java server, but I am also interested in NodeJS nowadays

Was it helpful?

Solution

This might answer some of your questions. Collection of good practices for building backbone applications and the pitfalls you should avoid. Grouped according to the topic (Models, Views, templating ... )

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top