Chapter 12 Commands
Introduction to Commands
Command objects are a part of the undo/redo system in MVC and Objective Views. A command is an object that knows how to save and restore an event. When the end-user performs an action on a model, the application collects the information required to execute that action into a command. Then, the application executes the command (in other words, it performs the action) and then saves the executed command to a transaction model. Saving a command to a transaction model enables the application to retrieve the command from the transaction model and unexecute or undo what the command did initially.
Figure 89 – Command Class Hierarchy