Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Mentioning Design Patterns, The pattern I use for this type of problem is "Class Factory". Using this pattern you won't need that each implementation are subclasses or not of the Interface (Well, actually you have several classes that implements the same interface). The class factory could, for instance, check a configuration file, the time of the day and the phase of the moon to decide which implementation to use and this would be hidden from the code that uses it.
daniel
In reply to Re: Strategy Handles
by ruoso
|
|