View Single Post
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#44
Regarding synchronizing contacts, even when both have been edited between synchs, i can't see the algorithm being all that complicated.

Always store both last modified date and last synch date.

If the number of each type(and subtype) of field is the same, consider changes to be editing them.

If the number is different, look for matches between the two contacts, leave the fields that match alone, the ones that aren't the same on both you treat as being added or removed (for additional advanced functionality, look for similar values between fields of the same type and of similar type (landline, cell and fax numbers, plain, work and home substypes etc) looking for potential changes and optionally ask the user whether they are the same or should be treated as seaparated)


In cases where both contacts have been changed between synchs, consider differences to be conflicts and have the user manually solve the conflicts. In case the synch dates (and times) don't match, ask the user what to do (choose on a case by case basis, use the most recent, oldest, from one source instead of other, the biggest one etc, with an additional option to remember this choice (for this session, forever or no, etc)




Did i miss anything?