I have a JSON response,
Basically a list of categories
[{event_cat_id: "1", event_cat_name: "Sport"
}, { event_cat_id: "25", event_cat_name: "Cinema" }]
using the ID, I query the server for a list of events.
All the events sent back are stored in a local DB.
My problem is that the list of categories can change, I want to know what is the best of way of checking for updates on the server.
I could send a request every time the view is clicked? Would that affect the user experience?
Building on android
On server side keep timestamp of last update for each record and property if record is available
ex:
id: 25, name: Cinema, available: 1, timestamp: 1342777317
It's easy to query data on server modified since a timestamp. At first synchronization last synchronization time is simply 0.
You can't delete records on server side, you can set them as unavailable: available: 0