Command Patterns are used in a lot of places.
- Of course what you see everywhere is a very trivial example of GUI Implementation, switches. It is also used extensively is game development. With this pattern the user can configure his buttons on screen as well.
- It is used in Networking as well, if a command has to be passed to the other end.
- When the programmers want to store all the commands executed by the user, e.g. sometimes a game lets you replay the whole level.
- It is used to implement callbacks.
Here is a site which provides as example of command pattern used for callback. http://www.javaworld.com/article/2077569/core-java/java-tip-68--learn-how-to-implement-the-command-pattern-in-java.html?page=2
- Here's another link which shows command pattern with database. The code is in C#. http://www.codeproject.com/Articles/154606/Command-Pattern-at-Work-in-a-Database-Application