comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: Easiest way to build Qt/Gtk interfaces for Ada programs
Date: Sat, 29 Dec 2012 01:18:34 +0100
Date: 2012-12-29T01:18:34+01:00	[thread overview]
Message-ID: <op.wp1xs8qtule2fv@cardamome> (raw)
In-Reply-To: 1gda5kzj50h3l.jzmq13s0hw74.dlg@40tude.net

Le Fri, 28 Dec 2012 16:32:09 +0100, Dmitry A. Kazakov  
<mailbox@dmitry-kazakov.de> a écrit:

> On Fri, 28 Dec 2012 06:51:01 -0800 (PST), alb348@gmail.com wrote:
>
>> I am a interested in creating GUI applications with Ada, using either Qt
>> or Gtk (it must be one of these two, because these are the only toolkits
>> that provide full BiDi support).
>
> One important thing, which implies the obvious consequences. There is no
> easy way of building GUI as well as no way of adding GUI to an existing
> application.
>
> Ignoring casual applications, it is unfortunately so, that whatever
> framework you use, and what the application is supposed to do  
> functionally,
> you have to build it around the GUI.

On the opposite, this is the least recommended way to do. One should  
create the UI around the application. The cleanest in my opinion, is to go  
for a Model View Presenter (MVP), preferably with a passive view. The  
presenter is the glue between the application and the view, and is also a  
model of the view's behaviour. The view, if passive, only receive display  
request, along with the data (which it does not fetch itself, to be  
independent from the application), and transmit events and user gestures  
to the presenter. This has some advantages, including easier separate  
design and easier testing (if the communication between the presenter and  
the view is correctly specified before).

The hard part is the presenter, but the UI may be an hard part too, if you  
have ergonomic requirements. The UI may be made of anything, and has its  
own and separate specification. The presenter is less independent, and is  
related to the application. You have to figure a way to setup a  
communication channel between all three parts: between the application and  
the presenter (both way), and between the UI and the presenter (both way  
too).

See: http://martinfowler.com/eaaDev/ModelViewPresenter.html
Note: according to Martin Fowler, the “Model View Presenter” designation  
may not be relevant, but that term is still widely used, so many people  
understand it. He himself designate it under the term of “Supervising  
Controller and Passive View” instead.

> There is no easy way of building GUI

That part still remains true, and is not just applicable to UI alone.


-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University



  parent reply	other threads:[~2012-12-29  0:18 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-28 14:51 Easiest way to build Qt/Gtk interfaces for Ada programs alb348
2012-12-28 15:32 ` Dmitry A. Kazakov
2012-12-28 17:30   ` alb348
2012-12-28 17:57     ` Dmitry A. Kazakov
2012-12-29  0:18   ` Yannick Duchêne (Hibou57) [this message]
2012-12-29  9:26     ` Dmitry A. Kazakov
2012-12-29 10:39       ` Yannick Duchêne (Hibou57)
2012-12-29 12:27         ` Dmitry A. Kazakov
2012-12-29 13:07           ` Georg Bauhaus
2012-12-29 13:26             ` Yannick Duchêne (Hibou57)
2012-12-29 13:09           ` Yannick Duchêne (Hibou57)
2012-12-29  0:27   ` Randy Brukardt
2012-12-29  1:02     ` Georg Bauhaus
2012-12-29  2:10       ` Yannick Duchêne (Hibou57)
2012-12-29  8:55       ` Dmitry A. Kazakov
2012-12-28 16:20 ` Vadim Godunko
2012-12-28 19:56   ` alb348
2012-12-28 20:38     ` Justin Time
2012-12-28 20:52       ` alb348
2012-12-29  0:48         ` Randy Brukardt
2012-12-29 10:23           ` Blady
2012-12-29 10:51             ` Yannick Duchêne (Hibou57)
2012-12-29 15:24           ` Justin Time
2012-12-31 21:49             ` Randy Brukardt
2013-01-01 10:46               ` Justin Time
2013-01-01 12:24                 ` Dmitry A. Kazakov
2013-01-01 16:55                   ` Justin Time
2013-01-02 10:00                     ` Dmitry A. Kazakov
2012-12-28 17:58 ` Justin Time
2012-12-31  8:07   ` ldries46
2012-12-31 20:58     ` John B. Matthews
2013-01-04 23:39     ` Brian Drummond
2012-12-29 16:40 ` leonid.dulman
2012-12-29 18:12   ` alb348
2012-12-30 17:27 ` leonid.dulman
2013-01-04 13:53   ` Patrick
2013-01-04 23:31     ` Brian Drummond
2013-01-05  8:57       ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox