
- Forum
- Testing
- Software Patterns
- suggestion needed for GUI design
suggestion needed for GUI design
This is a discussion on suggestion needed for GUI design within the Software Patterns forums, part of the Testing category; Hi, I am designing a GUI application with a lot of controls on a dialog box. The disable/enable or the ...
-
05-09-2005, 11:26 PM #1junchi.tang@gmail.com Guest
suggestion needed for GUI design
Hi,
I am designing a GUI application with a lot of controls on a dialog
box. The disable/enable or the default value of the controls will be
dependent on each other, also any actions made by the application(click
a button, ...) will cause some control been disabled while other been
enabled.
Any suggestion for an elegant solution on this? Is there any pattern to
address this issue?
-
05-10-2005, 08:56 AM #2Ted Hill Guest
Re: suggestion needed for GUI design
The mediator pattern.
-
05-10-2005, 12:39 PM #3paperless Guest
Re: suggestion needed for GUI design
How? And why not "State" pattern.
-
05-11-2005, 09:16 AM #4Ted Hill Guest
Re: suggestion needed for GUI design
paperless wrote:
> How? And why not "State" pattern.
>
Because there are many gui controls that affect each other.
Use mediator: each control talks to the mediator.
The mediator 'maintains state' and sends notifications to other controls
so they can enable/disable themselves, etc.
The mediator also talks to the 'data model' rather than having
individual controls going directly to the model.
-
05-11-2005, 02:13 PM #5Andrew McDonagh Guest
Re: suggestion needed for GUI design
Ted Hill wrote:
> paperless wrote:
>
>> How? And why not "State" pattern.
>>
>
> Because there are many gui controls that affect each other.
>
> Use mediator: each control talks to the mediator.
>
> The mediator 'maintains state' and sends notifications to other controls
> so they can enable/disable themselves, etc.
>
> The mediator also talks to the 'data model' rather than having
> individual controls going directly to the model.
hmm...maybe I'm reading you wrong, but...Mediate doesn't usually
maintain the state. It maintains the relationships of numerous objects,
so that they need not know about each other.
Unless you are you saying to use A Mediator as a top level controller
(as in MVC Controller). In that case, the (Hierarchical) HMVC pattern
helps tremendously with the interaction of smaller GUI panes/widgets.
ModelViewPresenter is a good alternative to the standard MVC, especially
when there is only ever going to be one View - as in a dialog Window.
Andrew
-
05-11-2005, 02:43 PM #6paperless Guest
Re: suggestion needed for GUI design
Mediator maintains state, where u read that buddy?
r u trying to be clever by manipulating role of "controller" in MVC
pattern to "Mediator pattern.
Mediator is not for enable/diable the GUI components. This is job of
"View" to decide depending on "State"/"Event".
Whether many gui controls r there or less, cant introduce one more
thing called "mediator" in alraedy nicely built pattern, called MVC.
Let the "View" decide whether to remain enable/diable itself.
-
Sponsored Ads

Reply With Quote





