Exforsys

Online Training

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 ...


Go Back   Exforsys > Testing > Software Patterns

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-10-2005, 12:26 AM
junchi.tang@gmail.com
Guest
 
Posts: n/a
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?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-10-2005, 09:56 AM
Ted Hill
Guest
 
Posts: n/a
Re: suggestion needed for GUI design

The mediator pattern.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-10-2005, 01:39 PM
paperless
Guest
 
Posts: n/a
Re: suggestion needed for GUI design

How? And why not "State" pattern.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-11-2005, 10:16 AM
Ted Hill
Guest
 
Posts: n/a
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-11-2005, 03:13 PM
Andrew McDonagh
Guest
 
Posts: n/a
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 05-11-2005, 03:43 PM
paperless
Guest
 
Posts: n/a
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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:15 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.