gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Re: problem with UI/logic separation


From: Christian Heller
Subject: Re: [Gnumed-devel] Re: problem with UI/logic separation
Date: Tue, 24 Feb 2004 08:47:33 +0100
User-agent: KMail/1.5.4

> > View
> >   ^
> >   |
> > Controller --> DB
> >   |
> >   v
> > Model
> >
> > The "Controller" is the GNUmed process; the DB another process (system).
> > The Controller catches all GUI events and contains the logics and
> > algorithms to process them.
>
> We are trying not to reinvent wxWidgets.

I don't know the wxWidget framework but for sure it offers interfaces
that one has to inherit, to make use of callback functions. So just let
your Controller classes inherit these interfaces so that the Controller
classes can react to GUI events. The Controller contains all logics,
workflow etc. and is responsible to control the GUI (popup frames,
dialogs etc.), not to "paint" things which wxWidgets do for you.

(The Controller initializes and knows the GUI, which is o.k. There
is an unlucky but necessary exception to unidirectional dependencies:
It is the GUI calling Controller callback functions the other direction.
This problem is caused by the design of today's GUI frameworks.
If you don't want to write your own, you have to live with this one
bidirectional dependency.)

> <sarcasm>
> And what do I do before dying of old age ?
> </sarcasm>

Well, this is the old problem of a steady "tightrope walk" between the
"ideal" architecture that takes ages and fast + practical workarounds.
May be it's even good for our common progress that there are projects
for both architecture categories.

Christian





reply via email to

[Prev in Thread] Current Thread [Next in Thread]