[patterns-discussion] Doubts regarding Strategy Pattern
SOURAVM at infosys.com
Thu Sep 23 00:38:01 CDT 2004
I've some doubts regarding Strategy pattern.
a) One almost always needs a Context hierarchy corresponding to the
Strategy hierarchy. This is because, when an algorithm changes, the
input data it needs will also be different. So is this an acceptable and
common modification of the Strategy pattern? And are there any side
effects of the same?
b) Isn't it advisable to use Factory in conjunction with Strategy
pattern so that client is protected from knowing about the specific
classes which implement specific algorithms?
c) If I have a situation where module have fairly well-defined
input but that input can come in a variety of ways - e.g., through the
database, on a message queue or directly from presentation tier through
a DTO, etc. - then is there a well known pattern to use to model this?
Any pointer/inputs on this will be really appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the patterns-discussion