Download the source for the Command Pattern or get it on Github.
The Command Pattern is a design pattern implemented for a multitude of purposes: progress bars, wizards, thread pools, multi-level undo, and networking to name a few. By encapsulating the request as an object, the Command Pattern allows us to parameterize other objects with different requests, queue or log those requests, and even support undo functionality.