Posted 18 years ago
by Bill Jacquot
![Avatar](https://secure.gravatar.com/avatar/32c6c0b99e662c08001b498d0173d1b7.jpg?s=64&d=identicon&r=g)
This is WRT UIStudio 2.0 for .NET 2.0. The BarCommand is very nice for UI based invocation of a command. However one additional benefit of the GoF command pattern is to allow for macros i.e. programmatic invocation of a command. In this case, you need to be able to programmatically "execute" a command hence the basic GoF command pattern has an "Execute" method. So how do you "execute" a BarCommand?
Also, another pattern commonly involved with the command pattern is the composite pattern in the implementation of a "MacroCommand". MacroCommand would contain a collection of "commands" but also implements the command pattern. When you execute the MacroCommand it in turn calls execute on each contained command. It might be a nice addition for a future release.
Also, another pattern commonly involved with the command pattern is the composite pattern in the implementation of a "MacroCommand". MacroCommand would contain a collection of "commands" but also implements the command pattern. When you execute the MacroCommand it in turn calls execute on each contained command. It might be a nice addition for a future release.