I am new to Xamarin, and I would like to know what the best practice would be for creating/updating data in my local database to simulate my server tables. I have not coded this portion yet, and I am really just looking for guidance.
My App when first opened should retrieve all data from my server and insert all that data to my local tables. I am almost duplicating the tables/data/column names from my server so that I don't have to make API call throughout my app and just pull that data locally.
As the user continues to use the app, my plan is to keep track of when this data gets updated (a timestamp) then pass that timestamp to my server and see if any new/ updated data happened after that timestamp. If changes have been made then I will only pull the updated information(which I will be doing in PHP).
I think up until here I have my process down, but please feel free to correct me. Now when it comes to bringing that new, updated or deleted data I am confused how to format that to send to xamarin. I have seen in android Apps where they call a web service and that returns a xml file, JSON format or a db file which either returns the data to then parse and either insert, update or delete, or sqlite queries with the data in loops to execute.
"UPDATE tblPerson ...."
If any of these options are possible which would be the best choice to run when the app is opened. Keep in mind I first check the last time information was updated, if no information has changed since that date I would just skip this step.
I really want to plan this out before I begin coding.