Lara DAbreo
Unregistered
|
|
I like your design however how would you recommend that this pattern be extended to allow dynamic decoration? With the current pattern (As I understand it), the onus lies with the creator to construct the appropriate decorated structure. How can I extend this to adjust for dynamic decoration based on context information known at compute time?
|
Anonymous
Unregistered
|
|
Ricky covered that in the "Construct Calculators" section.
|
Anonymous
Unregistered
|
|
I'm not so sure that he covered dynamic construction at all. What he said was that you could use this and that and discussion is out of scope bla bla. Nothing new here, the decorator pattern has been around for decades. The hard part is making the thing really decorate dynamically. And guess what, that's not covered!
|
glauco_vinicius
Unregistered
|
|
To have dynamic construction you should use de design pattern factory with a configuration file or with context information to build your decorator. Eclipse work with plug-ins to cover dynamic construction of decorators you can find more information at http://www.eclipse.org/articles/Article-Decorators/decorators.html
Look at strategy design pattern also.
|