Recommendations for implementing undo in master/detail scenario

Recommendations for implementing undo in master/detail scenario

Old forum URL: forums.lhotka.net/forums/t/7429.aspx


Jack posted on Sunday, August 09, 2009

Hi,

I was looking for some suggestions on what has worked for other people in terms of implementing an undo feature (much like say MS Word) that works when dealing with a set of master/detail lists.

Basically I have two lists (master data and detail data) where the master list allows for filtering down the detail list to relevant data.  The PK of an item in the master list is a FK of one or more item in the detail list.

My UI only shows the details for a single master record at a time.  The scenario I'm concerned about is that the user modifies 5 detail records on one master then switches master records and edits another 3 different detail records.

I'm assuming at this point I have 8 undo's that I can do.  In terms of the raw data it isn't such a big deal to undo but I'm having problems visually what makes sense in terms of the UI.  Would I let them undo 3 records and then if they hit undo a forth time I have to figure out which parent record to select, and then undo the 5th detail record on the first master set?

I still haven't figured out how well, if at all, this works with N-level undo as I don't think I care if a user keeps changing the same detail record over and over.  Regardless of how I decide to deal with the actally undoing of the data I'm trying to think how best to track this visually and not make it confusing.

Any ideas?  Anybody done something similar in an easy to maintain and simple fashion?

Thanks

jack

RockfordLhotka replied on Tuesday, August 11, 2009

This is not the way n-level undo works in CSLA. In fact, you are describing an entirely different undo model.

The CSLA model is very coarse-grained, in that it takes snapshots of the state of an object or object graph.

The Word model is very fine-grained, in that it records every user action.

You can only undo at the granularity you record, so if you want fine-grained undo capabilities, you need to implement fine-grained recording capabilities.

Jojo33333 replied on Wednesday, October 13, 2010

Hi Jack

Undo redo is quite complicated, especially when you want to do multiple undos.  The website www.undomadeeasy.com has a free manual that describes some of the issues of undoing botht eh database and the UI.  I have used it and it makes the whole thing very manageable.

ATB

JoJo33333

RockfordLhotka replied on Wednesday, October 13, 2010

jojo, since this is your third mention of this framework (and since you haven't actually contributed any meaningful information to this forum), I have some questions.

Is this an open source project, or commercial?

Does it work at the UI level, the business layer or the data layer?

Perhaps most importantly, have you tried using it with a CSLA business layer, and can you compare/contrast how it interacts with the CSLA features?

Jojo33333 replied on Thursday, October 14, 2010

My sincere apologies.

I am just starting with CSLA .NET 4.0.  So, no, it's not yet tried with CSLA. 

I've used it before and I have probably become an overenthusiasic fan.  When I hear of people worrying about UndoRedo I feel the need to tell them. 

Also it is a a shareware product - not open source which I guess goes against your grain.

For what it's worth, it is a general framework which operates at UI level, the business layer or the data layer.

Anyway your point is well taken.  I will fully understand if you remove my entries from your forum

Wishing you all success

JoJo33333

 

Copyright (c) Marimer LLC