Tuesday, October 19, 2010

Mount&blade Instruction Manuel

- Command

Design Pattern: Command
A First Look at wikipedia can tell us much of this pattern.

objects bearing the pattern are:

  • Subject Command - characterized by having a type and parameters to carry
  • Subject CommandType - a type associated with, usually implemented through enumeration.
The object is created (for example, associating the listener to a button) and sent to a system via Stream, the external system uses it directly without having to interpret numeric strings or held constant.

Good use of patterns is in the command handler in the client-server systems.


And here also sample code on the pattern

0 comments:

Post a Comment