I've never heard of an OOP design pattern called Flair. From the
class
you've pasted, it looks like a novice attempt at implementating
(sic) a design
pattern known as Decorator.
Perhaps they were trying to be funny with a reference to the movie
Office Space where buttons decorating a TGIFriday's uniform were
called
Flair? I know that comedy helps when teaching dry material, but
renaming a design pattern like that seems to me to be confusing at
best.
The pattern is similar to Decorator (as they acknowledge in the book)
but different in that it allows you to add and remove functionality
at runtime. I decided against Decorator because not all objects in
the app will need this functionality, and the ones that do can have
it turned on and off by the user. So I figured a separate class would
be a good way to encapsulate this functionality, and I remembered
this pattern from their book. I don't have a lot of background in
design patterns so I was curious if other people have used it.
Incidentally, you are correct about the Office Space reference. Here
is a post from Branden Hall, the book's author, from this very list:
http://chattyfig.figleaf.com/pipermail/flashcoders/2003-January/
060703.html
OK
DAH
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com