I have a contact resource
with a linked photo
.
Both, contacts/3
and photos/56
are fetch from the server at startup.
I assume it is good to keep my backbone collections in memory
and avoid fetching from the server all the time. I also keep my views
in the DOM as much time as I can for speed purposes.
When a user wants to delete the photo/56
, from all the photos
he has on the server, he can do it though the photo apps, I have
to eventually update contacts/3
locally in memory.
There is many solutions, however, what is the backbone traditional way to handle this scenario and have coherent linked models on the browsers ?
- Should I avoid keeping my models and views in memory and fetch them constantly ?
- Should I detect the impact on the related contact and request a sync on this element ?
- Should I have a notification resource to get those sorts of updates ?
Regards.