Are there any good Java XML UI toolkits

D

Dale King

Using XML for specifying the GUI seems a natural fit and there are a
large number of packages that try to do this. But in my research of
them, they all seem to be lacking in many ways. Many are not even in
active development anymore.

Is there any really good XML API for creating Swing UI's?

Some try to be agnostic to whether the API is for a web page or Swing.
This basically means they do a lousy job of both. In my case all I care
about is Swing.

Some try to create new abstractions to hide Swing. I don't want new
abstractions. Dealing with Swing is fine.

Most handle the basics of specifying simple hierarchies and simple
attributes, but when things get more complicated they break down. For
example, would be a JList and having the ability to specify the model,
the cell renderer, and the selection model. Not to many are powerful
enough to go there or more complex relationships when creating your own
types.

Some of the ones I have looked at are SwiXML, XUI, Luxor, gui4j, xamj,
and Jaxx.

Jaxx seems to be in active development and is fairly powerful, but it
has no direct support for localization (you have to do it yourself). It
also is a precompiler that turns your xml file into java source code. I
want the ability to allow XSLT transformation on the XML file at runtime
as part of localization.
 
C

Chris Uppal

Dale said:
Is there any really good XML API for creating Swing UI's?

I can't help with suggestions for what already exists, but the thought strikes
me: how hard would it be to do yourself ? Since (as I understand it) you are
not looking for any kind of abstraction away from Swing, but rather the ability
to specify Swing GUIs in XML instead of boilerplate Java code, it seems that a
table-driven approach would be quite powerful. Your hand-written Java code
(for interpreting the XML) would be table driven, mapping XML tags/attributes
into Swing constructions via either reflection or some sort of factory; and the
tables would be generated (off-line) by reflection on the Swing classes.

YAGNI, of course, is your friend in any such project ;-)

-- chris
 
J

J. David Boyd

Chris Uppal said:
I can't help with suggestions for what already exists, but the thought strikes
me: how hard would it be to do yourself ? Since (as I understand it) you are
not looking for any kind of abstraction away from Swing, but rather the ability
to specify Swing GUIs in XML instead of boilerplate Java code, it seems that a
table-driven approach would be quite powerful. Your hand-written Java code
(for interpreting the XML) would be table driven, mapping XML tags/attributes
into Swing constructions via either reflection or some sort of factory; and the
tables would be generated (off-line) by reflection on the Swing classes.

YAGNI, of course, is your friend in any such project ;-)

-- chris


<SWAGmode> Doesn't JGoodies use XML to store its UI information? </SWAGmode>
 
D

Dale King

Chris said:
I can't help with suggestions for what already exists, but the thought strikes
me: how hard would it be to do yourself ? Since (as I understand it) you are
not looking for any kind of abstraction away from Swing, but rather the ability
to specify Swing GUIs in XML instead of boilerplate Java code, it seems that a
table-driven approach would be quite powerful. Your hand-written Java code
(for interpreting the XML) would be table driven, mapping XML tags/attributes
into Swing constructions via either reflection or some sort of factory; and the
tables would be generated (off-line) by reflection on the Swing classes.

YAGNI, of course, is your friend in any such project ;-)

Oh, this is definitely not driven by real need. I already have the UI
specified mostly in code.

I am kind of using this particular project as an experiment in terms of
investigating the best ways of doing things both for my learning and to
serve as example code. So I am very much over-engineering this. For
example, in one part of the code I am taking the MVC notion to the
extreme as learning exercise in what code should look like. I am also
being very emphatic that the code supports localization even though the
code will likely never be localized.

So YAGNI is not an issue for me here. I am not trying to do the simplest
thing that works. I am trying to investigate the most elegant, best
design that works.

I had rolled my own scheme for creating and localizing menus and
toolbars specifying the structure using Properties files. But that's all
that it supported and was not very satisfying. I've read about using XML
for specifying GUIs and there was a lot of buzz about it, but it seems
to me to mostly be hype and in the end they all seem to fall short. I
was hoping that I was just missing something.
 
D

Daniel Pitts

Dale said:
Oh, this is definitely not driven by real need. I already have the UI
specified mostly in code.

I am kind of using this particular project as an experiment in terms of
investigating the best ways of doing things both for my learning and to
serve as example code. So I am very much over-engineering this. For
example, in one part of the code I am taking the MVC notion to the
extreme as learning exercise in what code should look like. I am also
being very emphatic that the code supports localization even though the
code will likely never be localized.

So YAGNI is not an issue for me here. I am not trying to do the simplest
thing that works. I am trying to investigate the most elegant, best
design that works.

I had rolled my own scheme for creating and localizing menus and
toolbars specifying the structure using Properties files. But that's all
that it supported and was not very satisfying. I've read about using XML
for specifying GUIs and there was a lot of buzz about it, but it seems
to me to mostly be hype and in the end they all seem to fall short. I
was hoping that I was just missing something.

Google for Spring Rich Client.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top