Gerald Bauer got the opportunity to sit down and have a chat with Andrzej Bialecki. This is the first part of the interview.
Welcome back to the Thinlet XUL Titan interview series. Today let's welcome Andrzej Bialecki of Luke fame.
Q: Can you tell us a little bit about yourself?
Andrzej Bialecki: I work for a Swedish company as an analyst and system architect, and at
the same time I do quite a bit of coding (as is the case in many small companies). We deliver solutions in the area of system integration, information retrieval, so called business intelligence and knowledge management.
Now, enough buzzwords - I'm a Polish native, currently living back in Poland (after a couple of years spent in Sweden), together with my family - wife, son and daughter. There's probably a formula describing how being married and with two kids affects the amount of time you can spend hacking the code - I can't recall the specifics, but it's at least exponential in order... ;-) But I do like hacking the code, and I still have a lot of satisfaction from just plain coding, and making the programs do what I want.
Nowadays I work mostly with Java, quite often using MDA tools (e.g. Together) for generating prototype implementations from UML models. I'm quite well versed in the Unix environment (including kernel hacking) - a couple of years ago I started a successful Open Source project named PicoBSD (an embedded version of FreeBSD) - so I'm quite familiar with how the things work in Open Source projects, and whenever I can I advocate the benefits of this model to my boss - not always an easy task... ;-)
Q: How did you stumble onto Thinlet?
Andrzej Bialecki: I was looking for an alternative to Swing for one of the projects. Having experienced the pain of hand-coding a Swing UI for another application I just couldn't believe there was no other way to create UIs other than implementing dozens of models, listeneres, and to litter your code with anonymous classes. There had to be another way (at least for me - I'm a programmer at heart, and programmers are lazy :-) ).
When I stumbled across the Thinlet Demo applet I knew that was it. The applet had an elegant and slim design, it contained all the widgets I needed at that time, and the XML descriptors were clean and intuitive - what more could I ask for? So, for me the main attraction of Thinlet was not the fact that it works in JDK 1.1, or Personal Java - it was the ease of prototyping, and re-using majority of the prototype code in the final application. A big time-saver.
Q: Have you tried out any alternative XML UI toolkits for Java before settling on Thinlet?
Andrzej Bialecki: More or less - I never went past test applications with a couple of
them, before deciding on Thinlet. At the time I was under a deadline, so I couldn't spend too much time for research. I had the least trouble to wrap my mind around the way Thinlet worked - so it was
enough at the time not to bother too much with alternatives. Now I would probably be more tempted to choose SwiXML, which IMHO strikes the right balance between the complexity (but also robustness) of Swing and the user-friendliness of the XUL paradigm.
Q: How did you get started on Luke?
Andrzej Bialecki: I was working on a suite of applications for business information
retrieval, which under the hood used Lucene extensively. If you want to know how to produce all kinds of corrupted Lucene indices, just ask me *laugh*... Finally, I came to conclusion (again, motivated by my laziness ;-) that it's time to put an end to writing short test programs
each time I want to do something with a Lucene index. So, the idea of a swiss-army knife-like tool for Lucene was born. And the choice of Thinlets for UI was quite natural - I already coded dozens of screens in Thinlet by that time, and I realized that I can prototype the GUI very quickly, and with minimal amount of unnecessary cruft - again, unlike with Swing...
Q: Can you tell us some challenges you faced building Luke using Thinlet?
Andrzej Bialecki: There were really two big challenges, or deficiences in Thinlet, which
caused me some grief. One was the lack of resizable and sortable tables - I had to figure out the best compromise for the column widths, and frankly nobody liked that compromise. Fortunately, in the latest (CVS) version of Thinlet this problem is fixed.
The other problem, which still remains unsolved, is the lack of truly modal dialogs. The logic flow becomes quite twisted if you can't pop up a dialog and just block the flow while waiting for some user input. It reminds me of the cognitive shock I experienced when trying to write my first XSL stylesheet, or my first SAX event handler - suddenly you need to switch from the linear flow to event-driven flow in the middle of a method, and it makes for a pretty convoluted code ... I hope
this issue will be addressed soon.
Q: Can you tell us what Luke can do today? What works and what needs to be done?
Andrzej Bialecki: Well, as far as I know Luke can do almost anything that you can possibly
do with an existing Lucene index - browsing the content, searching, deleting, optimizing, etc. It doesn't do much to _create_ indexes - that's perhaps a task better left for plugins that Luke now supports - but I believe it covers all functionality related to using existing indices - really, I just went through the Lucene API and hooked up most of the methods to the UI.
Of course, it was not so straightforward :-) - Luke also provides some functionality that is not directly available in Lucene (e.g. the top most frequent terms), or at least not without some non-obvious coding. Example: in the latest release Luke can reconstruct the original document contents using just the inverted term lists (i.e. even if the original text is not stored as such in the index). Lucene doesn't provide any functionality to "edit" the documents in the index, but Luke can emulate this function by first reconstructing the document, providing a simple text editor, and then inserting the edited copy back into the index.
Q: Was Luke your first Thinlet? Can you highlight some of your other apps built using Thinlet?
Andrzej Bialecki: No, it was rather a by-product of my work on a suite of commercial
applications I mentioned before. That suite ended up having something around 100 different screens and dialogs, most of them implemented using Thinlet, with some parts using Swing where the Thinlet widgets were not sufficient. I don't think I could've delivered such a complex system on time if not for the Thinlets...
This interview first appeared here.