comp.lang.ada
 help / color / mirror / Atom feed
* portable GUI , Ada backend, best design?
@ 1998-01-17  0:00 nma123
  1998-01-18  0:00 ` Tarjei T. Jensen
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: nma123 @ 1998-01-17  0:00 UTC (permalink / raw)



Hello,

I am seeking advice on this.

I'd like to do this:

      +-----------+     +--------------------+
      | GUI       |     | analysis           |
      | for data  |<===>| and                |
      | entry     |     | computational part |
      +-----------+     +--------------------+

Where the software must be portable with no code changes when building the
software on UNIX and Windows.

I looking at using  Ada (GNAT) for the analysis and computational part 
of the system, using Ada insures portability for the backend side.
 
The problem is what to use for the GUI part. the GUI part is for entering
user input, the parameters for the analysis part, so it is not very advanced
GUI, but it had to be portable.

I can look at using tcl/tk for the GUI, since tcl/tk is avaliable on both
UNIX and windows. has anyone used tcl/tk and called Ada from it? any problems?
can Ada make a callback into tcl/tk function to be able to update 
the GUI screen? I have not used tcl/tk, although played with some 
tcl/tk GUI scripts.

I can may be use Java for the GUI and use JNI to interface to C code that
calls Ada, the Ada calling C back that calls Java to update the GUI.

offcourse I can use X and Ada but that is not portable.

Any other ideas? how to do portable GUI that interfaces to Ada?

thanks,
n.
 




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: portable GUI , Ada backend, best design?
  1998-01-17  0:00 portable GUI , Ada backend, best design? nma123
@ 1998-01-18  0:00 ` Tarjei T. Jensen
  1998-01-19  0:00   ` Jean-Claude MAHIEUX
  1998-02-04  0:00   ` Mike Bartman
  1998-01-19  0:00 ` Thomas G. McWilliams
  1998-01-20  0:00 ` Martin C. Carlisle
  2 siblings, 2 replies; 13+ messages in thread
From: Tarjei T. Jensen @ 1998-01-18  0:00 UTC (permalink / raw)



nma123@super.zippo.com wrote:
> 
> Hello,
> 
> I am seeking advice on this.
> 
> I'd like to do this:
> 
>       +-----------+     +--------------------+
>       | GUI       |     | analysis           |
>       | for data  |<===>| and                |
>       | entry     |     | computational part |
>       +-----------+     +--------------------+
> 
> Where the software must be portable with no code changes when building the
> software on UNIX and Windows.
> 
> I looking at using  Ada (GNAT) for the analysis and computational part
> of the system, using Ada insures portability for the backend side.
> 
> The problem is what to use for the GUI part. the GUI part is for entering
> user input, the parameters for the analysis part, so it is not very advanced
> GUI, but it had to be portable.
> 
[snipped]
> I can may be use Java for the GUI and use JNI to interface to C code that
> calls Ada, the Ada calling C back that calls Java to update the GUI.
> 
> offcourse I can use X and Ada but that is not portable.
> 
> Any other ideas? how to do portable GUI that interfaces to Ada?
> 
> thanks,
> n.
>

You can use the ms-dos window. It is more or less compatible with a
vt100.

If the GUI is not very advanced it might be useful to do it as a one-off
in Visual Basic and use RPC to communicate with the computational
program. You could perhaps use GNAT or Aonix to code the communications.

For Unix you could probably do someting in TK/TCL and Ada. Perhaps still
using RPC to get commonality with the Windows version.

A third option would involve using a web browser as the user-inteface.
You could either use java (in Ada) for the user interface or run the
application as a cgi-bin program.

Greetings,

-- 
// Tarjei T. Jensen 
//    tarjei@online.no || voice +47 51 62 85 58
//   Support you local rescue centre: GET LOST!




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: portable GUI , Ada backend, best design?
  1998-01-17  0:00 portable GUI , Ada backend, best design? nma123
  1998-01-18  0:00 ` Tarjei T. Jensen
@ 1998-01-19  0:00 ` Thomas G. McWilliams
  1998-01-20  0:00   ` Jerry van Dijk
  1998-01-20  0:00 ` Martin C. Carlisle
  2 siblings, 1 reply; 13+ messages in thread
From: Thomas G. McWilliams @ 1998-01-19  0:00 UTC (permalink / raw)



nma123@super.zippo.com wrote:
: The problem is what to use for the GUI part. the GUI part is for entering
: user input, the parameters for the analysis part, so it is not very advanced
: GUI, but it had to be portable.

There is V and YACL. Both are free, portable GUIs. They are written in
C++. The V home page is: 
                         http://objectcenteral.com/main.htm

I don't know the YACL page; check Yahoo.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: portable GUI , Ada backend, best design?
  1998-01-18  0:00 ` Tarjei T. Jensen
@ 1998-01-19  0:00   ` Jean-Claude MAHIEUX
  1998-02-04  0:00   ` Mike Bartman
  1 sibling, 0 replies; 13+ messages in thread
From: Jean-Claude MAHIEUX @ 1998-01-19  0:00 UTC (permalink / raw)



You might use our TeleUSE/XInAda solution

TeleUSE is a popular gui builder for X11/Motif applications
XInAda is our (Top Graph'X) full Ada 95 implementation of 
X11/Motif libraries (not just a binding)
TeleUSE/XInAda is a bundle of both solutions including Ada code 
generators.

You may develop with TeleUSE/XInAda on one platform and then 
recompile the generated Ada code
on any supported platform for which we supply XInAda.

I hope this helps
Jean-Claude Mahieux
Sales and Marketing, Top Graph'X

-- 
Jean-Claude Mahieux -Top Graph'X - FRANCE 
Tel : (33 1) 69 26 97 88 Fax : (33 1) 69 26 97 89                
Email : 100071.45@compuserve.com                              
HTTP://ourworld.compuserve.com/homepages/topgraphx 




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: portable GUI , Ada backend, best design?
  1998-01-19  0:00 ` Thomas G. McWilliams
@ 1998-01-20  0:00   ` Jerry van Dijk
  1998-01-20  0:00     ` Jon S Anthony
  0 siblings, 1 reply; 13+ messages in thread
From: Jerry van Dijk @ 1998-01-20  0:00 UTC (permalink / raw)



In article <tgmEn0yKw.200@netcom.com> tgm@netcom.com writes:

>: The problem is what to use for the GUI part. the GUI part is for entering
>: user input, the parameters for the analysis part, so it is not very advanced
>: GUI, but it had to be portable.

>There is V and YACL. Both are free, portable GUIs. They are written in
>C++. The V home page is:
>                         http://objectcenteral.com/main.htm

Even worse, V can be (and is available as binary) compiled with the
GNAT compatible g++...

--

-- Jerry van Dijk | Leiden, Holland
-- Consultant     | Team Ada
-- Ordina Finance | jdijk@acm.org




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: portable GUI , Ada backend, best design?
  1998-01-20  0:00   ` Jerry van Dijk
@ 1998-01-20  0:00     ` Jon S Anthony
  1998-01-23  0:00       ` Doug Smith
                         ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Jon S Anthony @ 1998-01-20  0:00 UTC (permalink / raw)



jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk) writes:

> In article <tgmEn0yKw.200@netcom.com> tgm@netcom.com writes:
> 
> >: The problem is what to use for the GUI part. the GUI part is for entering
> >: user input, the parameters for the analysis part, so it is not very advanced
> >: GUI, but it had to be portable.

Java.  The new "Swing" stuff in particular should make this easy.

-- 
Jon Anthony
Synquiry Technologies, Ltd., Belmont, MA 02178, 617.484.3383
"Nightmares - Ha!  The way my life's been going lately,
 Who'd notice?"  -- Londo Mollari




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: portable GUI , Ada backend, best design?
  1998-01-17  0:00 portable GUI , Ada backend, best design? nma123
  1998-01-18  0:00 ` Tarjei T. Jensen
  1998-01-19  0:00 ` Thomas G. McWilliams
@ 1998-01-20  0:00 ` Martin C. Carlisle
  2 siblings, 0 replies; 13+ messages in thread
From: Martin C. Carlisle @ 1998-01-20  0:00 UTC (permalink / raw)



>I can look at using tcl/tk for the GUI, since tcl/tk is avaliable on both
>UNIX and windows. has anyone used tcl/tk and called Ada from it? any problems?
>can Ada make a callback into tcl/tk function to be able to update 
>the GUI screen? I have not used tcl/tk, although played with some 
>tcl/tk GUI scripts.

You will want to get a copy of TASH from the starting point:
wuarchive.wustl.edu/languages/ada/bindings/tash/tash800.htm

I'd also suggest getting a binary version of Tcl/Tk from Sun, and a
good Tcl/Tk book.  I have just started, but it looks straightforward
and the capability you describe above is present.

==Martin
-- 
Martin C. Carlisle, Computer Science, US Air Force Academy
mcc@cs.usafa.af.mil, http://www.usafa.af.mil/dfcs/bios/carlisle.html
DISCLAIMER:  This content in no way reflects the opinions, standard or 
policy of the US Air Force Academy or the United States Government.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: portable GUI , Ada backend, best design?
  1998-01-20  0:00     ` Jon S Anthony
@ 1998-01-23  0:00       ` Doug Smith
  1998-01-23  0:00       ` Dr. Michael Paus
  1998-01-28  0:00       ` Frank Petranka
  2 siblings, 0 replies; 13+ messages in thread
From: Doug Smith @ 1998-01-23  0:00 UTC (permalink / raw)



> > In article <tgmEn0yKw.200@netcom.com> tgm@netcom.com writes:
> > 
> > >: The problem is what to use for the GUI part. the GUI part is for entering
> > >: user input, the parameters for the analysis part, so it is not very
advanced
> > >: GUI, but it had to be portable.

WebAda solved the same problem using a browser, Web Server, and
Ada application (in this case a compiler). Full documentation is
on-line along with source code. It uses the suggested CGI solution,
so you must have your own server (such as NCSA's).

<http://sw-eng.falls-church.va.us/AdaIC/compilers/webada/developers/>

Doug Smith, EDS
dsmith@clark.net

-- 
Doug
dsmith@clark.net
703-742-8662




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: portable GUI , Ada backend, best design?
  1998-01-20  0:00     ` Jon S Anthony
  1998-01-23  0:00       ` Doug Smith
@ 1998-01-23  0:00       ` Dr. Michael Paus
  1998-01-28  0:00       ` Frank Petranka
  2 siblings, 0 replies; 13+ messages in thread
From: Dr. Michael Paus @ 1998-01-23  0:00 UTC (permalink / raw)



Jon S Anthony wrote:
> 
> jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk) writes:
> 
> > In article <tgmEn0yKw.200@netcom.com> tgm@netcom.com writes:
> >
> > >: The problem is what to use for the GUI part. the GUI part is for entering
> > >: user input, the parameters for the analysis part, so it is not very advanced
> > >: GUI, but it had to be portable.
> 
> Java.  The new "Swing" stuff in particular should make this easy.

Has anybody already written an Ada Interface to the Java Native Interface (JNI).
A complet implementation of this would be very helpfull to integrate Ada with
Java.

Michael




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: portable GUI , Ada backend, best design?
  1998-01-20  0:00     ` Jon S Anthony
  1998-01-23  0:00       ` Doug Smith
  1998-01-23  0:00       ` Dr. Michael Paus
@ 1998-01-28  0:00       ` Frank Petranka
  1998-01-28  0:00         ` Dr. Michael Paus
  2 siblings, 1 reply; 13+ messages in thread
From: Frank Petranka @ 1998-01-28  0:00 UTC (permalink / raw)



There have been some suggestions that a Java GUI be combined with an Ada 
back end.  Is this possible in a single process?  That is, can an Ada 
service that has been compiled to object code (not byte code) call a Java 
service or vice versa?

If so, which laguage must the "main" service be written in?


Disclaimer: The views or opinions expressed in this article are of the user 
and do not, in any manner, reflect that of the Navy.

            Frank J. Petranka          Naval Surface Warfare Center
            (540)653-4849              Dahlgren, Va. 22448
                    fpetran@nswc.navy.mil





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: portable GUI , Ada backend, best design?
  1998-01-28  0:00       ` Frank Petranka
@ 1998-01-28  0:00         ` Dr. Michael Paus
  0 siblings, 0 replies; 13+ messages in thread
From: Dr. Michael Paus @ 1998-01-28  0:00 UTC (permalink / raw)
  To: Frank Petranka


Frank Petranka wrote:
> 
> There have been some suggestions that a Java GUI be combined with an Ada
> back end.  Is this possible in a single process?  That is, can an Ada
> service that has been compiled to object code (not byte code) call a Java
> service or vice versa?

Yes, the Java Native Interface (JNI) does the trick. You only need an Ada
interface to the JNI which is of course defined in C and not in Ada. I've
already done some simple examples this way on Linux and did not encounter
any serious problems, with the usual exception that having to write such
an interface is a lot of work to do.

> If so, which laguage must the "main" service be written in?

It can be any of the two. The JNI supports both directions.

Michael




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: portable GUI , Ada backend, best design?
  1998-01-18  0:00 ` Tarjei T. Jensen
  1998-01-19  0:00   ` Jean-Claude MAHIEUX
@ 1998-02-04  0:00   ` Mike Bartman
  1998-02-05  0:00     ` Stanley R. Allen
  1 sibling, 1 reply; 13+ messages in thread
From: Mike Bartman @ 1998-02-04  0:00 UTC (permalink / raw)



nma123@super.zippo.com wrote:
> I'd like to do this:
> 
>       +-----------+     +--------------------+
>       | GUI       |     | analysis           |
>       | for data  |<===>| and                |
>       | entry     |     | computational part |
>       +-----------+     +--------------------+
> 
> Where the software must be portable with no code changes when building the
> software on UNIX and Windows.
> 
> I looking at using  Ada (GNAT) for the analysis and computational part
> of the system, using Ada insures portability for the backend side.
> 
> The problem is what to use for the GUI part. the GUI part is for entering
> user input, the parameters for the analysis part, so it is not very advanced
> GUI, but it had to be portable.

Why not use X-windows as the GUI?  It exists on most Unix systems, and
for the Windows side of the port you can run an X server to make the
PC an X terminal.  Unless you've got a pretty crippled TCP/IP stack on
the Windows box it should be possible to open the X server socket on
the local machine from the Ada backend application...or from a
different machine...makes no difference to X.

Using Java you run into GUI portability problems as well as speed
problems.  X is more widely supported, and more standardized, and
gives you options you don't get with Java (like a relatively "dumb"
terminal approach using X terminals), as well as easier control over
the look than you might get with standalone GUI apps that run on your
data entry stations.

To make a bit more sense out of that last bit, consider what might
happen with the "thick client" type of approach...you write your GUI
as a smart front-end app, that communicates over some sort of link
with the analysis code.  The analysis code may run on machine type A,
while you've got data collection stations on types A, B and C.  You've
written variants of your GUI code for each of these, and everything's
working.  Now you get a change order.  You now have to modify three
seperate GUI apps on three different platforms...a lot of work and
probably not all with one programmer.  Use a "thin client" approach,
like X, and your GUI app is really running on type A (or whatever) all
the time, while getting support for interface function from
pre-existing X servers on types A, B, and C...which you never have to
alter.  A change requires a change to one X app on your central
machine(s), and you're in business.  There no need even to distribute
the code, since the next time it's used, the new code is run.  Put a
thick client on every workstation and upgrades for bug fixes or new
features start getting expensive.

    -- Mike "proprietary stuff can be deadly too" Bartman --




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: portable GUI , Ada backend, best design?
  1998-02-04  0:00   ` Mike Bartman
@ 1998-02-05  0:00     ` Stanley R. Allen
  0 siblings, 0 replies; 13+ messages in thread
From: Stanley R. Allen @ 1998-02-05  0:00 UTC (permalink / raw)



Mike Bartman wrote:
> 
> nma123@super.zippo.com wrote:
>
> > I looking at using  Ada (GNAT) for the analysis and computational part
> > of the system, using Ada insures portability for the backend side.
> >
> > The problem is what to use for the GUI part. the GUI part is for entering
> > user input, the parameters for the analysis part, so it is not very advanced
> > GUI, but it had to be portable.
> 
> Why not use X-windows as the GUI?
>
>  [slice] -- good arguments for X as a GUI for PCs
>

Another alternative: use Tcl/Tk and its associated Ada binding
(TASH) for the portable GUI.  This is a seriously underappreciated
technology.  A Tcl/Tk interpreter can be "embedded" into your C
or Ada application.  Tcl/Tk has been ported to multiple platforms.

-- 
Stanley Allen
mailto:s_allen@hso.link.com




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~1998-02-05  0:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-17  0:00 portable GUI , Ada backend, best design? nma123
1998-01-18  0:00 ` Tarjei T. Jensen
1998-01-19  0:00   ` Jean-Claude MAHIEUX
1998-02-04  0:00   ` Mike Bartman
1998-02-05  0:00     ` Stanley R. Allen
1998-01-19  0:00 ` Thomas G. McWilliams
1998-01-20  0:00   ` Jerry van Dijk
1998-01-20  0:00     ` Jon S Anthony
1998-01-23  0:00       ` Doug Smith
1998-01-23  0:00       ` Dr. Michael Paus
1998-01-28  0:00       ` Frank Petranka
1998-01-28  0:00         ` Dr. Michael Paus
1998-01-20  0:00 ` Martin C. Carlisle

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