Silicon Valley Code Camp : October 6th and 7th, 2012
Tom Becker is the Software Architect at BD Biosciences, which develops lab instruments, reagents and software for scientific research and clinical diagnosis. His background is in scientific programming for biotech and aerospace projects, and also multimedia, developer tools and application frameworks.
This talk explains the design approach we used to implement unlimited persistent undo. Our goal was to be able to undo power fail. The user should be able to undo back to the creation of a document, even if it was previously saved or copied, and redo back to the latest state. If the power failed, when the user ran the software again it should redo any changes made since the last save so the document is back in the latest state.
The design we eventually came up with is deceptively simple. As a bonus, it helped us figure out how to design the model layer so it is very stable.
The implementation and examples are in C# .NET but the design may be applicable to other languages and runtimes.