comp.lang.ada
 help / color / mirror / Atom feed
From: falis@ma.aonix.com
Subject: Re: GUI in Ada
Date: 1998/09/18
Date: 1998-09-18T00:00:00+00:00	[thread overview]
Message-ID: <1103_906130799@DZOG-CHEN> (raw)
In-Reply-To: 6ttqcp$ovu$1@nnrp1.dejanews.com

I've been working recently with Ainslie Software's AdaJNI 
(www.ainslie-software.com), that provides bindings to JDK 1.1.6 
and Swing 1.0.2, as well as a binding generator for arbitrary 
Java classes.

AdaJNI works with GNAT and ObjectAda (and probably without 
too much trouble with other compilers).

The idea is that the application runs as native Ada code and 
fires up a JVM for the UI and for any other Java parts one might 
wish to use.

So far, I've been able to set up connections to Marimba's Bongo 
GUI builder (www.marimba.com), which uses the old JDK 1.0 
event handling model (requires interpreting the events in your 
Ada event handler by mapping widget names to enumeration 
values, done by a simple generic I've written).  Bongo is pretty 
rich as a GUI builder, and is very easy to use, but it's product 
future is uncertain.  Note that despite the 1.0 event handling, 
you can still use JDK 1.1.x or 1.2 beta.

This week, I set up a similar harness for IBM's VisualAge for 
Java 2.0.  Still working out some generalizations in the harness.  
VA is a truly impressive IDE 
(http://www.software.ibm.com/ad/vajava/), for which you can 
download a free trial.  It allows you to visually build and 
compose arbitrary Java beans (including non-visual ones 
incorporating application logic).  This allows UI specific 
manipulations that you may not want to have your Ada code 
deal with to stay encapsulated in the GUI part.  It also supports 
Swing.

The harness I put together should allow arbitrary Java beans, 
not just those from VA, to be interfaced via AdaJNI.  I've been 
using it effectively with JDK 1.2 beta 4.

The advantage fo the bean approach is that the interface to the 
GUI or other java code is much better localized than for using 
Bongo, as the JDK 1.1+ event model is used.

Although I haven't had the opportunity to test any of this with 
UNIX compilers or GNAT, there's no theoretical reason that the 
applications shouldn't be completely portable, JVM 
implementation differences factored.

Just another approach to the problem.

- Ed Falis
Aonix  




      parent reply	other threads:[~1998-09-18  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-15  0:00 GUI in Ada Christopher Raman
1998-09-15  0:00 ` Paul Whittington
1998-09-15  0:00 ` Markus Kuhn
1998-09-18  0:00 ` Gerhard H�ring
1998-09-18  0:00   ` dennison
1998-09-18  0:00     ` Corey Minyard
1998-09-18  0:00     ` falis [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