3 ms·
If someone has a recommendation for how to build/architect large GUI applications like Photoshop. For e.g., how to think about Undo operation right from the get
by machinelabo 6y ago
If someone has a recommendation for how to build/architect large GUI applications like Photoshop. For e.g., how to think about Undo operation right from the get-go . I think that would be amazing to learn if there is a course like that.
- vips7L 6y agoFWIW Undo was one of the use cases when the Gang of Four described the command pattern all the way back in 1994.
- benrbray 6y agoCheck out Game Programming Patterns (https://gameprogrammingpatterns.com/ https://gameprogrammingpatterns.com/) and the Architecture of Open Source Applications (http://aosabook.org/en/index.html http://aosabook.org/en/index.html).
- nightowl_games 6y agoHey. Check out Juan Pedro Bolivar Puente's talks om value oriented design. He worked on Ableton which is a large application. He specifically speaks to Undo. He describes a much better pattern than the Command Pattern. He also released his source for Value Oriented Data structures Juan Pedro is a next level programmer who I think has pushed the craft forward through his work on bringing Value Oriented Design into the C++ world. Talk I https://youtu.be/sPhpelUfu8Q https://youtu.be/sPhpelUfu8Q Talk II https://youtu.be/SAMR5GJ_GqA https://youtu.be/SAMR5GJ_GqA Data Structures: https://github.com/arximboldi/immer https://github.com/arximboldi/immer Application Structure: https://github.com/arximboldi/lager https://github.com/arximboldi/lager Text Editor: https://github.com/arximboldi/ewig https://github.com/arximboldi/ewig Good luck.
- machinelabo 6y agoWow. Thank you.
- kls 6y agoUndue can be fairly trivial if your data structure and controls are implemented correctly, for example a common undo redo pattern is to have an immutable structure in a vector, new operations clone the last good object, add an entry on top of the vector, and undo is to just move your reference to the previous object, redo you move it forward. There are other patterns but this one works fairly well for simple time-travel undue / redo operations.