dimanche 4 juin 2017

Command pattern: How to handle multiple interaction tools?

Hi I am curious about how I best would create a generalized structure to handle multiple interaction tools in a command pattern setting. (Think polygon creation line drawing or similar)

Here are some ideas I get on the top of my head.

  1. Should I send a command for each interaction?
  2. Should I create a builder to handle all interaction until the command is aborted or finished and then send a single command?
  3. Should I create a composite command class that sends a start command then intermidiates and then a stop command to my receiver?

Links to some litteratur or an implementation would be much appreciated.

Aucun commentaire:

Enregistrer un commentaire