K
K
korner-brazers2020-06-19 09:08:16
Programming
korner-brazers, 2020-06-19 09:08:16

Rollback changes - how to implement?

Interested in ways to implement rollback in complex programs, such as Adobe Photoshop.
I have a program. She is very complex. For example, when creating an instance of a class, a list of new dependencies and various HTML parts are created.

An example of what happens when a button is clicked (create a class).

-An array of class {id: ....} is created -An array of
folders [....]
-CSS array {id: ....}
-An HTML code of the folder
is created -An HTML CSS code
is created -Change listeners
are created -Then recalculation of all counters
- And all sorts of little things ....

And here's how to be in this case? Many different operations are going on. I have no idea how something like this is implemented in products from Adobe.
Tell me please, in which direction should I look?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-06-19
@firedragon

https://refactoring.guru/en/design-patterns/command

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question