Chronicle of the Xul Revolution
Welcome back to the XUL Titan Interview series. Today let's welcome Dimitri Pissarenko of SwiXml Viewer fame.
Q: Can you tell us a little bit about yourself?
Dimitri Pissarenko: I'm a 23 year old Russian software engineer currently resident in Vienna, Austria. From 1996 to 2001 I was learning at the Higher Technical School for Electronic Data Processing in Vienna (the famous "Spengergasse"). In 2002 I got a BSc degree in Computer Science from the Austrian Partners of the University of Derby.
During my time at the higher technical school I started to work part-time for a company, which specialised in development of web-based applications in ASP and PHP. I worked for that company until the end of 2001. After finishing my BSc thesis in summer 2002, I started to work on a project, which aims at creation of a process modelling system, which will be used primarily for performing analyses of environmental friendliness of electric and electronic devices.
Q: How did you stumble onto SwiXml?
Dimitri Pissarenko: When developing web applications I often had to create forms in HTML. At some moment I thought that it would be nice to be able to create Java GUIs with the same effortlessness as HTML forms. Personally, I am more efficient in creating a GUI by writing a couple of lines than either by using a graphical editor (such as those found in Together ControlCenter or Visual Basic) or manually programming them.
First, I tried to use Luxor XUL. That attempt failed because I played with it too little before I got your suggestion to use SwixML.
After I looked at SwixML, I stopped to look for alternatives because it fully satisfied (and satisfies) my needs.
Q: Have you tried out any alternative XML UI toolkits for Java before settling on SwiXml?
Dimitri Pissarenko: As already said, I tried Luxor XUL. Recently, I've looked at XUI and Thinlet.
I like SwixML particularly because of the simplicity of its UI descriptors. Thinlet's UI descriptors seem to be as simple as those of SwixML. Luxor XUL was a bit too complicated for me and XUI's UI descriptors are too verbose.
I want to stress that I'm using SwixML only for rendering UIs, event handling is done in Java. In this setting, the UI generation framework has to be simple. All my normative statements about Luxor XUL, XUI, SwixML and Thinlet refer to this setting.
I'm sure there are other circumstances (e. g. when the UI generation mechanism should do more than only displaying the UIs), under which other XML UI toolkits may be more suitable than SwixML.
Q: How did you get started on Demetrix?
Dimitri Pissarenko: I wanted to write some program from scratch, in which I could incorporate some of my ideas I got while working on a commercial process modelling system.
Most important part of it is the automatic UI generation mechanism for JavaBeans and objects, whose interfaces conform to a certain standard.
Q: Can you tell us some challenges you faced while using SwiXml in Demetrix?
Dimitri Pissarenko: Well, the use of SwixML was the least problematic part in working on demetrix. Perhaps this was due to the fact, that SwixML is used in demetrix only for rendering the UI and I didn't use it in any sophisticated setting.
Q: Can you tell us how the automatic UI creation using SwiXml works in Demetrix?
Dimitri Pissarenko: I think that a piece of code tells more than thousand words, so I prepared a small example of how automatic UI creation works.
Full code is located in file
src/Demo.java in the
In order to build it, you need to enter
ant -f build-demo.xml.
In order to run the example, type
java -jar demo.jar.
Both these commands should be entered in the directory, where
is located. And you need Ant, of course.
In this example, a data object is created first. That object has several properties:
After all of these properties were added, we create a
which will be used for displaying the data object.
PropertiesPanel generates a
in which all properties of the data object are displayed. This
JPanel is shown
JDialog is there, you can view and enter values of the
properties. You can also create new properties. If a new property was created, the data object
is updated automatically.
A "unified property architecture" is advantageous for other domains
too, for instance, you one can write one
TableModel and use it to display
Another example is the export to Excel in demetrix (see files
Here I wrote classes for reading and writing collections of
to/from Excel, and these classes can be used for all
Thanks Dimitri Pissarenko. Check back next week for the second part of the SwiXml Titan interview with Dimitri discussing scripting choices for SwiXml, what's Dimitri's take on styling Swing UIs using CSS, what's next for SwiXml Viewer and much much more.
|Please send comments on our web pages to our public xul-talk mailinglist or to a member of our web team.||Copyright © 2003, 2004, 2005 Open XUL Alliance|