According to GoF,
The complexity of
WidgetChanged
increases proportionally with the complexity of the dialog. Large dialogs are undesirable for other reasons, of course, but mediator complexity might mitigate the pattern’s benefits in other applications.
Here is book excerpt : https://goo.gl/mO1ydZ
So, can we delegate the handling of events related to helper class of Mediator, like this, to reduce the complexity of Mediator?
void FontDailogDirector::WidgetChanged(Widget * theChangedWidget)
{
HelperofFontDialogDirector(theChangedWidget);
}
Is it good design? I am noob to design patterns. Thank you.
Aucun commentaire:
Enregistrer un commentaire