Command Processors

Variation 1: Smart commands know how to execute themselves:

Variation 2: Commands are little more than strings. All of the intelligence resides in the command processor, which might use a parser and a multi-way conditional or a table to decide how to execute commands.

Consider the Interpreter pattern if commands have complex syntax.