Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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.

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://520895]
[holli]: a pope t-shirt? are the words "fuck the" printed on it?
[Eily]: ...
[Eily]: I just realized that there's an onion in your eye
[marto]: bishop t-shirt?
LanX zooming holli s picture seeking onion
[holli]: Oh, seems like LanX' team has won the fourth World Cup ... awesome!
LanX grins
[marto]: anyway, don't come to Glasgow for the football :)
[holli]: the hell? i have a scriptblocker on.
[holli]: how do you update a different window without javascript?

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (13)
As of 2017-12-14 16:10 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (398 votes). Check out past polls.