From kde-kimageshop Tue Feb 10 11:48:42 2004 From: Boudewijn Rempt Date: Tue, 10 Feb 2004 11:48:42 +0000 To: kde-kimageshop Subject: Re: Design idea Message-Id: X-MARC-Message: https://marc.info/?l=kde-kimageshop&m=107641480727497 On Tue, 10 Feb 2004, Patrick Julien wrote: > I think you are using the wrong design pattern. Please, allow me this humble > suggestion: the mediator design pattern. No need for humble -- you're the architect here :-). > > So, you have a director (the mediator) that sits between the colleagues > (whatever class spawned the dialog and the concrete dialog). > > If I reuse the example given, the director has access to the internals of > core, it can build a map of strings to composite ops. It then passes the > strings to the dialog. When a selection occurs, the dialog emits the > selection using the original string. The mediator matches the string to the > composite operation using it's map. The mediator then passes the composite > operation to whoever wanted it. Or simply, on return of the dialog, etc. > Okay, that sounds good -- give a lot more decoupling between ui and core. I'm going to try that tonight, I think. -- Boudewijn Rempt | http://www.valdyas.org/fading/index.cgi _______________________________________________ kimageshop mailing list kimageshop@kde.org https://mail.kde.org/mailman/listinfo/kimageshop