I'm creating an app about birds. This app should also work in offline mode. So I decided to use Core Data. I plan to have 1 table with approximately 700 records. All the birds will be displayed in a table view. Workflow should be like this:
- User starts app
- Request is sent to server in background
- Response is parsed
- Database is updated
I'm interested what's the best way to do this. My point is to add to the request "last modified" field, this will decrease the number of times database should be updated. Should I delete all instances of my entity, or loop them one by one comparing "last modified" field and then update/delete/insert ? Has anybody made time-profiling ? When user opens screen with birds in the period when old instances are already deleted and new are not inserted, he will see an empty table view, how to handle such situation, do I need a tmp entity ? Are there any other pitfalls I've missed ?