comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <mcondic.auntie.spam@acm.org>
Subject: Re: [OT] Best way to isolate a GUI?
Date: Tue, 18 Feb 2003 08:08:53 -0500
Date: 2003-02-18T13:10:25+00:00	[thread overview]
Message-ID: <b2tbc1$o0v$1@slb5.atl.mindspring.net> (raw)
In-Reply-To: MPG.18b98425db7e9aef989698@News.CIS.DFN.DE

It depends on just how isolated you want to go. When I've built things with
GtkAda, I've wanted the GUI to be unbundled from the "real" app so I'd have
an easy time changing front ends if that seemed to be necessary. To do that,
I just create an isolation package that responds to the callbacks & sends
data to the GUI - the rest of the app is one or more objects that do all the
computational work.

If you want to swap out front-ends at will without changing any code, I can
suggest what happens in various military systems I've worked on. You pick
some standard communications link and carefully define a message catalog
that specifies the exact format and content of the communications to run
between the subsystems. (A command/response protocol is usually simplest,
but not always possible depending on how many different things are
communicating & what has to happen) This lets you substitute *anything* at
the front end so long as it can properly produce & respond to the message
catalog.

It would be good for Ada to have some kind of conventional GUI and maybe
this suggests a possible answer: Define a message catalog and Ada interface
to it that would allow adaptation to any number of possible GUI
environments. Most GUI things tend to work on the concept of "messages"
anyway, so its hardly a big stretch. I think there are some things that
would have to be overcome (like lack of certainty about representation with
stream operations or various problems with tagged records - things that
might be overcome by using some kind of text based protocol like XML - which
has its own downsides). A little creativity might result in a clean, simple
way of getting Ada a "standard" GUI without killing any existing GUI
builders.

MDC
--
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/

Send Replies To: m c o n d i c @ a c m . o r g

    "Going cold turkey isn't as delicious as it sounds."
        -- H. Simpson
======================================================================
Jano <402450@cepsz.unizar.es> wrote in message
news:MPG.18b98425db7e9aef989698@News.CIS.DFN.DE...
> Hello,
>
> as for my (lately) frequent questions, you may be aware I'm starting a
> new project in Ada. Well, the matter is that I want the core
> functionality to be isolated from the GUI. And that's the question:
> how's the best mean to do that.
>
> I've thought the following:
>
> 1) Use AWS and let any browser do the rendering. That's not really
> isolating the GUI, because all the generating code would be inside the
> core (unless I also apply):
>
> 2) Use sockets to communicate the two processes.
> 2.a) Use regular Ada streams to pass data types.
> 2.b) Use some other protocol, for example [compressed] XML.
>
> 3) Your sugestions welcome.
>
> I would want that the isolation be such any kind of GUI can be build on
> top. Maybe even made two of them run concurrently. For example, web
> reports via AWS and a control GUI with native look.
>
> Any have prior experience? Some successful example on the wild to check?
>
> Thanks in advance,
>
> --
> -------------------------
> Jano
> 402450[at]cepsz.unizar.es
> -------------------------





      parent reply	other threads:[~2003-02-18 13:08 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-16 10:19 [OT] Best way to isolate a GUI? Jano
2003-02-16 14:47 ` Ed Falis
2003-02-16 14:49 ` Victor Porton
2003-02-17 20:52   ` Jano
2003-02-16 16:36 ` Robert C. Leif
2003-02-17  8:44   ` Preben Randhol
2003-02-17 16:22     ` Robert C. Leif
2003-02-17 17:30     ` Jeffrey Carter
2003-02-17 17:54       ` Warren W. Gay VE3WWG
2003-02-17 19:06         ` Randy Brukardt
2003-02-18  3:15           ` Warren W. Gay VE3WWG
2003-02-18 16:14             ` Robert C. Leif
2003-02-18 18:10             ` Randy Brukardt
2003-02-18 21:12               ` Warren W. Gay VE3WWG
2003-02-18 23:20                 ` Randy Brukardt
2003-02-19 18:28                   ` Warren W. Gay VE3WWG
2003-02-20 19:39                     ` Randy Brukardt
2003-02-20 21:34                       ` Warren W. Gay VE3WWG
2003-02-20  7:50                   ` Dale Stanbrough
2003-02-19 12:49                 ` Marin David Condic
2003-02-19 18:35                   ` [OT] Best way to isolate a GUI? (The final concensous?) Warren W. Gay VE3WWG
2003-02-20 12:40                     ` Marin David Condic
2003-02-20 13:13                       ` Dmitry A. Kazakov
2003-02-20 22:01                       ` Warren W. Gay VE3WWG
2003-02-21  1:25                         ` tmoran
2003-02-21  2:08                         ` Marin David Condic
2003-02-21 17:27                           ` Jeffrey Carter
2003-02-22 14:10                             ` Marin David Condic
2003-02-21 18:02                           ` Warren W. Gay VE3WWG
2003-02-22 14:49                             ` Marin David Condic
2003-02-22 22:50                               ` tmoran
2003-02-23  5:18                               ` Robert C. Leif
2003-02-24 18:06                               ` Warren W. Gay VE3WWG
2003-02-25  1:20                                 ` Robert C. Leif
2003-02-25 17:57                                   ` Warren W. Gay VE3WWG
2003-02-25 12:41                                 ` Marin David Condic
2003-02-25 13:32                                   ` Ole-Hjalmar Kristensen
2003-02-25 17:33                                     ` [OT] Best way to isolate a GUI? (The final fronteer?) Warren W. Gay VE3WWG
2003-02-20  8:26                   ` [OT] Best way to isolate a GUI? tmoran
2003-02-20 12:51                     ` Marin David Condic
2003-02-20 18:47                       ` tmoran
2003-02-17 19:31         ` tmoran
2003-02-18  1:37         ` Jeffrey Carter
2003-02-18  3:39           ` Warren W. Gay VE3WWG
2003-02-18 23:36           ` Randy Brukardt
2003-02-18 13:29         ` Marin David Condic
2003-02-18 18:01           ` Warren W. Gay VE3WWG
2003-02-19 13:06             ` Marin David Condic
2003-02-16 17:25 ` achrist
2003-02-16 21:24 ` Bobby D. Bryant
2003-02-16 21:52 ` David Marceau
2003-02-17  0:57 ` Re; " tmoran
2003-02-17  7:25   ` Jano
2003-02-17 14:09     ` Bobby D. Bryant
2003-02-17 21:12       ` Jano
2003-02-18  7:24         ` Jean-Pierre Rosen
2003-02-18 13:08 ` Marin David Condic [this message]
replies disabled

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