XUL Titan Interview with William Moore (of Lux XUL fame)

Gerald Bauer <[email protected]> Tue, 19 Apr 2005 16:43:16 -0700
Newsgroups gmane.comp.lang.xul.announce
Message-ID <[email protected]>
Hello,

   Welcome back to the XUL Titan Interview series. Today let's  
welcome Lux XUL project lead William Moore.

Q: Can you tell us a little bit about yourself?

William Moore: Alright. I like long walks in the park.  My education  
is only a B.S. in Computer Science from Kansas State University. For  
most of my life, I have lived in either Kansas or Missouri.  One of  
my interests in computers have been trying to develop methods for  
cross platform applications.

Q: How did you get started on LUX XUL? Did you look into any existing  
XML UI language projects before starting on LUX XUL? Can you tell us  
a little bit about LUX XUL's history?

William Moore: Back when I started college in 1998, I wanted to  
develop an easy to build GUI that would behaive the same way on all  
systems and not require too many large DLLs. In late 2002, while in  
college, I started searching for a language that would allow me to  
design the GUI for a small application easily and would act the same  
way on most if not all operating systems.  Usually, Java's Swing  
would be the choice, however, I didn't want to spend all of that time  
messing with GUI code when most small applications, in truth, do not  
need to have a lot of time spent developing.  So, I searched on the  
Internet and found out Mozilla uses one that was simple.  However, I  
only wanted a runtime and to get that required a lot of time which  
was not readily available at the moment.  After I graduated, I was  
unemployed for a while and decided to spend my free time continuing  
this search.  At first, I tried Glade, but that was unnecessarily  
complex for what I wanted to do. Eventually, I discovered Luxor.  At  
first, this seemed what I wanted because due to the fact it is  
written in Java, there is no reason to recompile for every operating  
system.  Also, the Mozilla browser would have to be installed on ever  
computer to run Mozilla's XUL.  However, one problem Luxor seems to  
have is that it is not close to Mozilla XUL with regards to the  
program package structure and tags.

As far as the history goes, there is not much to tell.  Originally, I  
was just going to modify Luxilla to make it use plug-ins for the  
standard tags.  However, I decided it would be easier to make my own  
because I felt that Luxor required too much disk space, memory (not  
that these are a gross amount, but I wanted a XUL runtime that would  
run on devices such as PDAs), unnecessary packages, and unnecessary  
code.  Over time, I found myself wanting to build my own.

Q: Can you briefly sketch out LUX XUL's architecture and its building  
blocks?

William Moore: Sure!  In essence, there are three parts.  The first,  
is the run time called Lanterna.  Next, there are the plug-in JARs.  
For every tag that is to be loaded by Lanterna, there is an XML file  
called config.xml in the root of the plug-in's JAR that contains the  
name of the tag and its Java CLASS definition.  These definitions are  
used in constructing and executing the tags. Finally, each program is  
contained in a ZIP file with similar structure to Mozilla XULs.  More  
information can be found at <http://lux-xul.sourceforge.net>.

Q: Can you tell us how you handle the mapping from XML tags/ 
attributes to Swing classes/properties? Do you use reflection? Do you  
use hand-coded glue code?

William Moore: No problem.  As mentioned earlier, every Lux XUL tag  
is implemented in a separate JAR.  I use the Java reflection API to  
load the plug-in's CLASS file, as indicated by the index found in the  
JAR's root, and insert the Class object into a hash table.  At the  
moment, the attributes are
hard coded in each tag's definition.

Q: Can you tell us some challenges you faced creating a toolkit that  
lets you create Swing applications using markup and scripting?

William Moore: The most significant had to be designing a large  
enough tag coverage that would be useful for most applications.  The  
other would be constructing those tags.  Lux XUL is based on the  
Fourth Draft of Mozilla XUL.  As such, I tried to improve upon the  
tags and attributes.

Q: What's the hook? Why would anyone use LUX XUL over say good old  
Java Swing coding?

William Moore: Generally, for programs, I would recommend Lux XUL.   
It is compact and simple enough to use.  For scripting, it uses  
Jython, which actually provides some power.  On the one hand, one  
gets to use Python 2.1.  On the other, there is complete access to  
the Java API.

Q: Can you tell us what LUX XUL can do today? What works and what  
needs to be done?

William Moore: Well, most of it works well.  I need to continue  
implementing the tags.  Definitely, CSS must be completed.

Q: Can you tell us why you choose Python as LUX XUL's scripting  
language? Any plans for adding support for alternative scripting  
languages to LUX XUL (e.g. Beanshell, Groovy, Javascript)?

William Moore: Python is easy for the end user to use for scripting.   
I will look into Beanshell and Groovy because I do not know them.  In  
the future, there will probably be the ability to script with  
JavaScript.  Due to the fact that Python 2.1 has a large library, I  
chose it first.

Q: Do you have any plans of adding web-style form submission tags to  
LUX XUL? What's your recommended approach for data-binding for LUX XUL?

William Moore: In March, I started considering web-style tags.   
However, my time is quite limited at the moment due to fact I started  
working.  Of course, this
would be a reimplementation of every Lux XUL tag in a plug-in.  The  
data binding is the last thing I was planning.  More than likely,  
there will be a table that each XUL tag and script can access.

Q: Any plans of supporting different UI toolkits such as SWT, wx4j or  
Java Gnome, for example? Or do you plan to stick to Swing?

William Moore: No, there are no plans.

Q: Can you tell us how popular LUX XUL is? (e.g. How many downloads?  
Are there any applications/projects using LUX XUL? What's the  
interest in the Java Swing community? etc.)

William Moore: It does not seem to be very popular.  If it catches at  
all, it will probably slow.  But this is okay; I created this for  
myself, but I felt it would be helpful to someone else, which is why  
it is free software.  It is not trash, but it is not important that  
this become massively popular.

Q: Who else is behind LUX XUL? Do you work on your own? How much time  
do you spend on LUX XUL development? How can someone get involved in
LUX XUL?

William Moore: It is only me, myself, and I.  At the moment, I have  
not done much development.  However, I am quite accepting of people  
joining. Don't get me wrong, I do have standards, but they are not  
too high.  To get involved, you can send an e-mail to me at  
<caranmegil AT yahoo DOT com>. What I am looking for is someone with  
Java programming knowledge who would build a decent enough system for  
integrating CSS.

Q: What do you think about Mozilla XUL? How does it differ from LUX  
XUL? Do you envision LUX XUL to run Mozilla XUL apps out-of-the-box?

William Moore: Yes and no.  Because of the way tags implemented, it  
is somewhat possible to support Mozilla XUL "out of the box".   
Because of how design of the standard tags went, it is not possible  
for Mozilla XUL to be run without major rewrites.

Q: What's next for LUX XUL?

William Moore: I have not released Iteration 3 just yet because at  
the moment I am not at my home.  In two or three weeks, it should be  
released. In this one, the complete standard tag set should be  
completed.  Also, a form system similar to Luxor has been  
implemented.  In the future, there will eventually be a system for  
CSS and a plug-in approach to adding more scripting languages.    
Also, I will create a system for placing and using Python modules in  
the Lux XUL JAR.


Thank you William Moore for taking time out to share your thoughts.  
Keep up the great work on Lux XUL.

Links:
* Lux XUL @ http://lux-xul.sourceforge.net
* Luxor XUL @ http://luxor-xul.sourceforge.net


-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728