English Reference

Word

command pattern

Definition

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.

Examples

“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.”

Examples

simple

“The software uses the command pattern to handle the undo button.”

contextual

“By implementing the command pattern, the developers allowed the user to queue multiple file operations and execute them sequentially.”

complex

“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.”

Usage

Commonly used in object-oriented programming and software architecture discussions.

Etymology

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.

Domain

Software Architecture

This entry

Exam level
CambridgeCambridgeCambridge English QualificationsThe exam suite from Cambridge University Press & Assessment, from A1 Movers up to C2 Proficiency. The benchmark names double as CEFR labels.C1 AdvancedIELTSIELTSInternational English Language Testing SystemThe 0–9 band test co-owned by the British Council, IDP, and Cambridge. Used for university entry, work, and migration.7.0–8.0TOEFL iBTTOEFL iBTTest of English as a Foreign Language, Internet-Based TestETS's academic English test, the standard route for US university admissions. Scored 0–120, with a 1–6 scale since 2026.1–6 scale: 5.0–5.595–113TOEICTOEICTest of English for International CommunicationETS's workplace English test, big in Japan and Korea. Listening & Reading scores 10–990 and tops out at C1.945–990EikenEikenTest in Practical English ProficiencyThe English proficiency test from the Eiken Foundation of Japan, widely taken by Japanese students. Grades run from 5 to 1, with Pre-1 and Pre-2 between them.Grade 1
Level
C1 · Advanced
Updated

QR code

englishreference.com/q/command-pattern

English Reference