As I have not got the right answer what i was expecting. I think I was not able to put my question Properly.
Let me specify my Current Implementation.
1)User Enter some Data (Here means Task of Daily Schedule) from the app.
2)Same funcnality is provided from website.
3)When User Enter any Task from App he can see same task on Portal (I do background Syncing).
4)User Can Add,Edit,Delete Task From both Side.
5)In the Following Way I handled the Add,Edit & Delete Task.
I have Status Column in the table.
Status = 0 means task is sync on both side.
Status = 1 means newly added task
Status = 3 means user deleted the task which was on server.
a)when user add any task I insert that task with Status = 1.
When I sync the task I extract all the task with status = 1.
Put the task in ADD tag.
b)On server side task is added in the database and it again send back to app with unique primary id. (needed when user edit any task.) I insert that task to my table with status = 0.
c)Now when user edit any task I first check the status of task, if its Status = 1,I keep the status as 1. but status is 0 i changed that status = 2.
d)If user delete any task I check the status if its status = 1 I delete that task, if its 0 or 2 I changes its status to 3.
Now when Sync Method is Called, I search through Table
Put All the Task in Add tag which has status = 1.
Put All the Task in Edit tag which has status = 2.
Put All the Task in Delete tag which has status = 3.
Now on server side This Xml is parse and its inserted, updated , Deleted according to tag.
The same method which I have mentioned above is followed on server side, and Add
Edit Delete xml is created.
I parser the task on app side do the insertion, updation and Deletion according to xml.
So My question was How do I improve this type of Sync Model.
Any one Knows better syncing Model in which from both side (Website & App) user can add,edit,delete.