4 ms·
I love the fact that Undo/Redo is particularly marked as a difficult problem. I ALWAYS find making Undo/Redo robust to be one of the biggest challenges in any
by bsder 9y ago
I love the fact that Undo/Redo is particularly marked as a difficult problem.
I ALWAYS find making Undo/Redo robust to be one of the biggest challenges in any software application.
- Waterluvian 9y agoSame. In concept it seems really easy. Immutable data, events, two stacks, push pop. But in practice it's never that easy. Unless you base entire systems' designs around making undo/redo easy, but then it feels like you're making a lot more work for yourself elsewhere.
- aequitas 9y agoI think autodesk did this really well with their Fusion 360 CAD application (probably others as well but this is the one i know). Because the CAD concept in general is build around parameterisation every modification the user makes needs to be able to be remade with on a different starting (or previous) state. In a way it becomes even more then a first class citizen functionality in the application. The entire history stack (timeline) is available and you can even directly edit, reorder or modify individual steps and their parameters instead of just un/redoing them.
- lucaspiller 9y agoIs there a name for this kind of architecture? Once I was daydreaming and thought something similar would work well for business CRUD applications. You get an audit log for free, and it would enable offline edits relatively easy.
- nine_k 9y agoI'd start looking from "event sourcing".
- averagewall 9y agoIn CAD, it's called parametric modeling, at least the part about being able to regenerate from the start. "feature-based" seems to be the aspect of having features attached to other features in a tree structure rather than a linear sequence of operations.
- imiric 9y agoThe principle of immutable log streaming is used in the Lambda[0] and Kappa[1] architectures. It's also used by state management libraries like Redux[2]. The concept is generic and simple enough that it can be applied to any application where a timeline of state snapshots is useful, so maintaining a history for undo/redo purposes and audit logs is a great fit for it. [0]: https://en.wikipedia.org/wiki/Lambda_architecture https://en.wikipedia.org/wiki/Lambda_architecture [1]: http://milinda.pathirage.org/kappa-architecture.com/ http://milinda.pathirage.org/kappa-architecture.com/ [2]: https://redux.js.org/ https://redux.js.org/
- tomaskafka 9y agoYou will be happy to read this famous post if you haven't yet - log instead of database is a great abstraction! https://engineering.linkedin.com/distributed-systems/log-what-every-software-engineer-should-know-about-real-time-datas-unifying https://engineering.linkedin.com/distributed-systems/log-wha...
- MartinodF 9y agoSnapseed (Android & iOS) does a great job as well. It lets you go back to each of the previous steps and edit the parameters without losing your current state.
- pkaye 9y agoI think there is some bug with the undo in Planet Coaster with path creation that as a byproduct allows people to create smooth curved plazas. When you add a branch to a linear path and undo it, it seems to create a smooth curve at times so you can repeatedly shape the path. https://www.youtube.com/watch?v=OEtI8Q4XCek https://www.youtube.com/watch?v=OEtI8Q4XCek