T
TEK
Hello
I'm wondering if anyone out there might give some
input/suggestions/viewpoints around the Command pattern.
In my case, the number one priority for using the pattern is undo support.
Some now, a lot more in the future.
I think I have a pretty good understanding about how the command pattern is
tought to work, however during implementation I'm htting a couple of quite
large design considerations that I'm not sure I have the answare to.
There is problably no 100% answares to the issues, but maybe some best
practices?
The main issues I'm looking at is:
1) Should the command class or the receiver implement the code that peforms
the operations the command is for.
2) Should the command class be given all arguments needed to peform the
operations when initialized, or should it be collected during execution.
3) Should the command class be allowed to peform UI operations, as asking
the user for confirmation, or should it be limited to peform pure business
operations.
Any feedback would be appriciated...
Regards, TEK
I'm wondering if anyone out there might give some
input/suggestions/viewpoints around the Command pattern.
In my case, the number one priority for using the pattern is undo support.
Some now, a lot more in the future.
I think I have a pretty good understanding about how the command pattern is
tought to work, however during implementation I'm htting a couple of quite
large design considerations that I'm not sure I have the answare to.
There is problably no 100% answares to the issues, but maybe some best
practices?
The main issues I'm looking at is:
1) Should the command class or the receiver implement the code that peforms
the operations the command is for.
2) Should the command class be given all arguments needed to peform the
operations when initialized, or should it be collected during execution.
3) Should the command class be allowed to peform UI operations, as asking
the user for confirmation, or should it be limited to peform pure business
operations.
Any feedback would be appriciated...
Regards, TEK