Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Strategy Handles

by Anonymous Monk
on Jan 04, 2006 at 13:38 UTC ( #520895=note: print w/ replies, xml ) Need Help??


in reply to Strategy Handles

One of the nice aspects of this technique is that it is run-time dynamic: you can reassign (or re-bless) the strategy object ($output_strategy) at any time, to select a different strategy.
Instead of re-blessing, you should use a different strategy object. What you call strategy is the View in Module-View-Controller pattern.


Comment on Re: Strategy Handles
Re^2: Strategy Handles
by jdporter (Canon) on Jan 04, 2006 at 19:41 UTC
    Instead of re-blessing, you should ...

    I never said one should rebless. My meditation illustrates a technique using inheritance tree twiddling, not reblessing. But TIMTWOTDI. I mentioned re-blessing parenthetically because it's another way to achieve the same result, and might be preferable for some people or in some circumstances.

    What you call strategy is the View in Module-View-Controller pattern.

    Only in the example I gave. Strategies can be used anywhere in an architecture.

    We're building the house of the future together.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://520895]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (14)
As of 2014-12-18 15:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (56 votes), past polls