Hi,

The current solution for keeping track of changes for syncing is to
hide deleted items by means of a filter and letting objects themselves
keep track of their state (i.e. new, changed, etc.). This is
problematic, because now parents cannot trust their children()
anymore. If a child is deleted, it will still be part of the list of
children of the parent, since the child was never really deleted from
the domain object container.

I think we have had and are still having quite a few bugs related to
this. For example, [1] the overall priority of a task is wrong when it
has a deleted child with a priority that is higher than the task's
priority. This is caused by the task not knowing that the child has
been deleted.

I'd like to get rid of the state tracking in domain objects and let
separate objects do the necessary bookkeeping. I wrote a ChangeTracker
[2] class a while ago, but it's not used yet. I'd like to use that
class instead of the bookkeeping done in the domain objects themselves
and with the DeletedFilter.

Any objections? Recommendations?

Thanks, Frank


[1] https://sourceforge.net/support/tracker.php?aid=2519143
[2] 
http://taskcoach.svn.sourceforge.net/viewvc/taskcoach/trunk/taskcoach/taskcoachlib/domain/base/changetracker.py?view=markup

Reply via email to