For stateful applications, there are 5 different ways of managing the history of state:
- No History - Living in the moment. - Examples: Any stateful application that doesn't discards all previous states upon mutation.
- Ad Hoc Snapshotting - Allows restoration to manually saved snapshots. - Examples: Memento Pattern.
- Singleton - Only remembers the previous snapshot, where undoing the undo is just another undo. - Examples: Xerox PARC Bravo.
- 1 Stack - Allows linear undo. - Examples: AtariWriter.
- 2 Stack - Allows linear undo and redo. - Examples: Browser History, Microsoft Word, Adobe Photoshop.