Design Pattern Riddle #6
21 Jul 2008q. You might think I am the real thing,
But Iβm just a thin outer case.
I typically call methods on another machine,
which might make bug tracking hard to trace.
a. Proxy
~/riddle by me
q. You might think I am the real thing,
But Iβm just a thin outer case.
I typically call methods on another machine,
which might make bug tracking hard to trace.
a. Proxy
~/riddle by me
q. Some say that I have schizophrenia;
I change my behavior depending on my mood.
You might think I am someone else,
But Iβm just a class with an attitude!
a. State
~/riddle by me
q. When there are many way to do one thing,
And you need to switch from that to this.
Just abstract away those different pieces;
Then youβll be living in encapsulated bliss.
a. Strategy
~/riddle by me
q. You might call me a herald of the news
I distribute it to those that subscribe
Some say I follow the Hollywood principle,
But Iβll tell you that c# delegates and I jibe.
a. Observer
~/riddle by me
q. If you find yourself needing more functionality,
And your needs are dynamic and versatile,
Then Iβm a good alternative to subclassing.
You will find that using me quite worthwhile.
a. Decorator
~/riddle by me