Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Strategy Handles

by Anonymous Monk
on Jan 04, 2006 at 13:38 UTC ( [id://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.

Replies are listed 'Best First'.
Re^2: Strategy Handles
by jdporter (Paladin) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://520895]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2024-04-23 10:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found