OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: XML-based GUI definition

[ Lists Home | Date Index | Thread Index ]
  • From: Michael Brennan <Michael_Brennan@Allegis.com>
  • To: 'Mike Alexander' <mike.alexander@pindarsystems.com>
  • Date: Fri, 21 Jul 2000 18:36:17 -0700

I've stumbled across a couple of things like this, but I don't have the URLs
handy. (I'll see if I can dig them up over the weekend.) Two I recall
offhand are Abstract User Interface Toolkit (AUIT), and IBM's Bean Markup
Language (BML). The latter can, I believe, be found on IBM's AlphaWorks site
(www.alphaworks.ibm.com). I can't remember where I found the other. I don't
know anything about Xing (but if you find references to it, please pass them
along; I'm always interested in seeing what others are doing in this
regard).

I also wrote my own mechanism for doing this. I didn't care for the design
of the others I was finding at the time I started, so I wrote my own with
the goals of offering the simplicity of HTML authoring with the ability to
fully leverage the functionality of Swing. Its not very complete at present
(I've just dabbled with it in my spare time; it hasn't been a focused
effort), but there is a fair amount in it.

Key features of my implementation:
* Simple HTML table-like syntax for creating GridBagLayouts, as well as
support for BorderLayouts, BoxLayouts, and GridLayouts.
* Support, at present, for labels, text fields, scroll panes, check boxes,
and buttons. (Adding support for other widgets should be a trivial exercise.
I just haven't done it yet.)
* Support for lists and tables (although I just started restructuring this
code in line with a new design, so its kind of broken, now).
* Simple extensible model that uses a Properties file to specify the type of
object to instantiate in response to a tag. This model includes support for
being able to instantiate a graph of objects that does not map one-to-one to
the XML document structure. Also, the core layer can be used to instantiate
a graph of any types of objects from an XML document, not just GUIs. The GUI
stuff is built as a layer on top of that.
* Simple declarative syntax for binding GUI elements to JavaBean properties,
and binding JavaBean methods to events. The mechanism relies upon reflection
at runtime to work, but all references to methods and properties are
resolved when the form is first loaded, so any errors can be easily caught
up front.
* Uses JAXP and SAX for the XML processing.

Caveat:
* Requires JDK 1.2 or above.

This was just an experiment, and the stuff definitely has dependencies on a
lightweight framework I started developing (as well as log4j, an open source
logging package), but I wouldn't mind sharing this with someone to get some
feedback on whether others find it generally useful or if my approach is
half-baked.

I haven't drafted any formal license statement, at present, but I'd be
willing to make it available under terms equivalent to the Apache or Mozilla
licenses. If what I've described sounds like it meets your needs and you'd
like to evaluate it (and your timeline can accomodate the fact that it is
still incomplete and may be a bit rough), then let me know and I can work on
packaging it up and making it available.

I will also see (when I get home) if I've saved the URLs for other toolkits
out there and will forward whatever I've got.

> -----Original Message-----
> From: Mike Alexander [mailto:mike.alexander@pindarsystems.com]
> Sent: Friday, July 21, 2000 3:58 PM
> To: XML-Dev
> Subject: XML-based GUI definition
>
>
> We are about to develop a Java-based client application and
> want to incorporate a highly configurable user interface
> within the software. Ideally we want to be able to construct
> the interface dynamically (i.e. at run time) from an XML file
> that defines all of the component elements. We plan to use
> Swing for the UI.
>
> We've had a quick look at XUL but don't think this is what we
> really need. We've also heard of Xing (?) which is apparently
> a mechanism to define Swing classes but can't find much
> information on this.
>
> So, the question is, does anyone know of any existing
> technology that will allow us to do this within a Java application?






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS