mardi 9 juin 2015

undo / redo software pattern for split merge

I have a somewhat complex piece of genomics software where I allow undo and redo operations. If I have an element A, I can move it to A0, A1, A2, A3, etc. and move it around to any point in its history. This is easy.

What I'm trying to figured out is the concept of splits and merges. If I have A0 and B0 and, I can merge them into A1 and go back and forth fairly easily. However, if I go back to A0/B0 and decide to do something else instead of the merge on either component, things start to become hazy in terms of recording history. My intuition, is that I would ditch my merge history once I changed either A0 or B0.

My specific questions are: 1 - what would a user expect (git paradigm, google doc paradigm, etc.)? 2 - are there any common paradigms to deal with this more complex paradigm (I don't think that the Momento or Command Pattern deal with these cases [split/merge] well)? 3 - is there an easier / less sophisticated way to deal with such patterns that might be "good enough"?

Any thoughts would be helpful.

Thanks.

Aucun commentaire:

Enregistrer un commentaire