Hacker News new | past | comments | ask | show | jobs | submit login

How would you do playback and automatic undo/redo without encapsulating your state transitions?



Instead of storing an action descriptor stack, you can also implement undo/redo by storing all past versions of the model on the server. I know surprisingly complex applications with large data sets that do this. The important point of course is that any large data should reside in separate immutable storage, so that the top-level model (which gets serialized for each action) remains as lightweight as possible.


Yes, AKA "poor man's undo."


Why ask the question if you knew the answer?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: