I have a design-pattern question. I have a framework for our smart-client application similar to CAB (Composite Application block), and we call it widget-framework. Where we can define the modules of our application as a "Widget", and there is a config file which lists all the widgets. The widget is any class that implements IWidget interface. All the widget have code to load sub-widgets, and that code is identical. How to share that code among all those widgets, without forcing the widget to inherit from concrete class? What is the best practice in this case? Is there a design pattern for this case?
Thanks