command pattern
compound.compound. a way of writing computer code where you turn a request or action into its own object. This lets you save, queue, or undo actions easily because each command is separate from the code that runs it.
compound. a behavioural design pattern in which an object is used to encapsulate all information needed to perform an action or trigger an event at a later time. This decoupling allows for the parameterization of clients with different requests and supports undoable operations.
The software uses the command pattern to handle the undo button.
By implementing the command pattern, the developers allowed the user to queue multiple file operations and execute them sequentially.
The command pattern is particularly effective in graphical user interfaces where a single menu item must trigger complex logic while remaining decoupled from the underlying business objects.
A compound term formed from the noun command, denoting a specific instruction to a computer, and pattern, in the sense of a recurring structural design in software engineering.
Etymology adapted from Wiktionary, available under CC BY-SA 4.0.
Commonly used in object-oriented programming and software architecture discussions.
Last updated July 22, 2026