Command

Learn about a behavioral design pattern: the command pattern.

The command pattern is a behavioral pattern that provides us with the ability to separate an action that needs to be done from the moment that it is requested to its actual execution. More than that, it can also separate the original request issued by a client from its recipient, which might be a different object. We are going to focus mainly on the first aspect of the patterns: the fact that we can separate how an order has to be run from when it actually executes.

Get hands-on with 1200+ tech skills courses.