[plt-scheme] GUI Development Approach

From: Paulo Jorge Matos (pocmatos at gmail.com)
Date: Wed Nov 23 05:23:12 EST 2005


Thanks for the references, however, I think that the problem is not about MVC.
The issue is that I'm trying to create independent classes for a set
of widgets. And these widgets sooner or later require one another.
Probably I should not try to make them so independent. If nobody
suggests better I'll be merging every cycle into one object to
eliminate cyclic dependencies.

Here's my situation.
I developed a low-level set of functions to handle database access,
data transformation and filtering, etc. Now I have a set of objects
which generate the GUI and call these low-level functions. I have a
Main object, a Menu object, a List Object and an Info Object.
The Main object creates the main frame and calls menu object which
gets passed the main frame, creates menus and attaches itself to the
frame. Then from Menu I create a pane in the frame and generate two
other objects List and Info. The List object generates a list and the
info object creates some labels, a readonly list and a button.
However, I initially managed to create the Info obj first and send
List to the Info object as an init-field. However now, I see that List
and Info require each other.  Probably I'll merge Info and List into
one. But still, while we're on the subject are there any ideas,
comments and suggestions to this 'object-oriented' user interface
separation 'schema'?

How do you usually work out your UIs?


Paulo Matos

On 23/11/05, Corey Sweeney <corey.sweeney at gmail.com> wrote:
> You may wish to investigate "Model-view-controller"
> http://en.wikipedia.org/wiki/Model-view-controller.  It
> sounds like this is probably what you don't want, but it's a known name, and
> you can use it as a keyword to run searchs for alternatives to
> model-view-controller.
>  Also, note that the Drscheme GUI builder allows the builders GUI
> representations to be inline, so you can put pieces anywhere you want.
>  I talk about guibuiler here:
> http://students.depaul.edu/~csweeney/Guibuilder.Tutorial.html
>  Corey
> On 11/22/05, Paulo Jorge Matos <pocmatos at gmail.com> wrote:
> >
> > Hi all,
> >
> > I'm not used to development of GUI applications but from what I've
> > seen from GTK apps (generated usually by Glade) and MrEd apps, code
> > gets a mess rapidly since all widgets get stuck into the same file
> > when created due to the fact that they interact with one another. A
> > button click updates a list box. The list box updates some fields. The
> > menu bar... etc, etc, etc...
> >
> > Is there a structured approach to writing a GUI without having to
> > define all widgets in a module.
> > I tried to define each GUI part as an object. Initially I had a
> > dependency graph and I made sure all widgets which generated a
> > dependency cycle (changed each other) were within the same module. And
> > the initial implementation started ok. With the need to add features,
> > I started to need to change this button and that label and that...
> > that were in diferent models. Now I'm stuck in the middle of cyclic
> > module dependencies... :-|
> >
> > Any hints, tips, or reference papers would be _greatly_ appreciated.
> >
> > Cheers,
> > --
> > Paulo Jorge Matos - pocm at sat inesc-id pt
> > Web: http://sat.inesc-id.pt/~pocm
> > Computer and Software Engineering
> > INESC-ID - SAT Group
> > _________________________________________________
> >   For list-related administrative tasks:
> >    http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >
> --
> ((lambda (y) (y y)) (lambda (y) (y y)))

Paulo Jorge Matos - pocm at sat inesc-id pt
Web: http://sat.inesc-id.pt/~pocm
Computer and Software Engineering

Posted on the users mailing list.