Skip to Content.
Sympa Menu

patterns-discussion - [patterns-discussion] Doubts regarding Strategy Pattern

patterns-discussion AT lists.cs.illinois.edu

Subject: General talk about software patterns

List archive

[patterns-discussion] Doubts regarding Strategy Pattern


Chronological Thread 
  • From: "souravm" <SOURAVM AT infosys.com>
  • To: <patterns-discussion AT cs.uiuc.edu>
  • Subject: [patterns-discussion] Doubts regarding Strategy Pattern
  • Date: Thu, 23 Sep 2004 11:08:01 +0530
  • List-archive: <http://mail.cs.uiuc.edu/pipermail/patterns-discussion>
  • List-id: General talk about software patterns <patterns-discussion.cs.uiuc.edu>

Hi All,

 

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.

 

Regards,

Sourav

 

 




Archive powered by MHonArc 2.6.16.

Top of Page