Exforsys

Online Training

How a simple GUI problem can get messy - patterns to the rescue?

This is a discussion on How a simple GUI problem can get messy - patterns to the rescue? within the Software Patterns forums, part of the Testing category; Hello everybody! I'm facing a problem in designing a GUI which appeared quite simple at first glance but got ...


Go Back   Exforsys > Testing > Software Patterns

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-18-2003, 10:01 PM
Malte Persike
Guest
 
Posts: n/a
How a simple GUI problem can get messy - patterns to the rescue?

Hello everybody!

I'm facing a problem in designing a GUI which appeared quite simple at
first glance but got montrous by the time passing.

The objective is as followes. Suppose having these two different GUI
widgets:

(A) a slider
(B) an edit field

These widges interact, so when the slider position is changed, the
value in the edit field gets modified, too, and vice versa.


Things get complicated due to the fact that the edit value does not
resemble the position of the slider directly or by a fixed proportion.
The slider range can be dynamically set by the user so that it might
represent a scale from 1 to 10, 1 to 100 or even 52 to 387.

The transformation logic "slider <-> edit field" must not be included
in the GUI form itself because this provides the form with to much
intelligence. Instead it shall reside in a seperate object that can
exchange information with the form.

But how do I implement this. Command, Observer, Visitor? What would
you do?

Thanks for reading and kind regards,
Malte

---

The above e-mail address is not valid.
To contact me, please use my real
e-mail address:

malte AT t DASH online DOT de

Just replace the capitalized words with
the corresponding punctuation marks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-19-2003, 12:52 PM
Malte Persike
Guest
 
Posts: n/a
Re: How a simple GUI problem can get messy - patterns to the rescue?

>I'd look at "model view controller" also known as MVC.

Being not familiar with SmallTalk and relatively new to patterns I was
totally unaware of the MVC concept. Well, at the risk of getting
struck by lightning instantaneously I even thought that MVC had
something to do with Microsoft Visual C++.

So thank you very much for the information, MVC is exactly what I was
looking for.

Regards,
Malte

---

The above e-mail address is not valid.
To contact me, please use my real
e-mail address:

malte AT t DASH online DOT de

Just replace the capitalized words with
the corresponding punctuation marks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-19-2003, 01:52 PM
Guy
Guest
 
Posts: n/a
Re: How a simple GUI problem can get messy - patterns to the rescue?


<brougham5@yahoo.com> wrote in message
news:ms65pv42sm0hoqus0vbk07pgok1klsf046@4ax.com...
> Malte Persike <malte@nospam.com> wrote:
>
> >The transformation logic "slider <-> edit field" must not be included
> >in the GUI form itself because this provides the form with to much
> >intelligence. Instead it shall reside in a seperate object that can
> >exchange information with the form.
> >
> >But how do I implement this. Command, Observer, Visitor? What would
> >you do?

>
> I'd look at "model view controller" also known as MVC.


You might also want to look at a variant called Model-View-Presenter.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-19-2003, 05:44 PM
Shane Mingins
Guest
 
Posts: n/a
Re: How a simple GUI problem can get messy - patterns to the rescue?

"Malte Persike" <malte@nospam.com> wrote in message
news:rsm3pv04emkejdftnfce2r5511fgifk6tt@4ax.com...
> Hello everybody!
>
> I'm facing a problem in designing a GUI which appeared quite simple at
> first glance but got montrous by the time passing.
>



You may find the following article of interest --

http://www.objectmentor.com/resource...eDialogBox.pdf

It is covers creating a GUI application test-first which results in
separating application logic out of the GUI. IOW it illustrates a good
design.

HTH
Shane


--
shanemingins@yahoo.com.clothes

remove clothes before replying

"It is not the strongest of the species that survive, nor the most
intelligent, but the one most responsive to change." --- Charles Darwin


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-23-2003, 03:02 PM
Malte Persike
Guest
 
Posts: n/a
Re: How a simple GUI problem can get messy - patterns to the rescue?

<gmarremoveentette@neo.rrremovetoo.com> wrote:

>You might also want to look at a variant called Model-View-Presenter.



Good advice. I found an informative series of articles on MVP and its
implementation (in Delphi, though) here:

http://www.btinternet.com/~joannac/

Regards,
Malte

---

The above e-mail address is not valid. To
contact me, please use my real e-mail address:

malte AT t DASH online DOT de

Just replace the capitalized words with the
corresponding punctuation marks.
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 04:40 PM.


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.