Thesis: Genericity and Variablility - A Framework For Graphical Editors

Submitted by Hannes Schmidt on Wed, 06/02/2004 - 09:53.

For the impatient: Download thesis as PDF or view as HTML.

During my Masters program in Computer Science I had to write a thesis. Instead of simply writing on a subject determined by one of my professors I picked a subject on my own. Unsurprisingly, my professor had his own research interests so we had to find a compromise. The result of our negotiations was that I would write on two separate subjects, trying to link them with each other. As each of these subjects was worth a thesis of its own, I ended up writing two theses in one. In addition to that, I implemented a software engineering tool and the core of a graphical user interface (GUI) framework. In retrospect, I don’t regret doing it that way because although it was quite labor intensive it was also very interesting. The only drawback was that I wasn’t able to exhaust either subject even remotely.

My thesis, Genericity and Variability - A Framework For Graphical Editors, is a criticism of inheritance, Java’s in particular, as a mechanism for software reuse. It attempts to offer a more flexible yet safer alternative to inheritance: component weaving. As proof of concept I wrote a byte-code post-processor that implemented this weaving: WeaveJ. That’s part one.

The second part concerns JDraw, my original GUI framework, which uses WeaveJ in order to prove the effectiveness of weaving as an alternative to inheritance. At the core of every GUI framework there is a layout engine. For JDraw I let myself be inspired by Unidraw’s and TeX’ intuitive, almost physical approach to component layout. The resulting engine’s layout specification is powerful and flexible, yet simple and easy to understand compared to other layout managers that existed at that time (mainly Swing’s). I chose an algorithm similar to the resolution of networks of electrical circuits, based on Kirchhoff’s and Ohm’s laws. Unfortunately, that algorithm was not general enough to solve every possible layout originally allowed by my design. To avoid having to restrict layouts I had to come up with a work-around. This all happened as the deadline for finishing my thesis was rapidly approaching. If I hadn’t finished the layout engine, the entire framework would have been worthless, and without the framework I wouldn’t have been able to prove that weaving actually works. Luckily I did find a work-around that was effective for 99% of all possible layouts. All’s well that ends well.

My text is available in PDF format or as one big HTML file. The original PowerPoint presentation which I used for my defense (in German) is available as a zipped PPT file or converted to PDF. Note that the latter doesn’t contain the animations found in the original version.

UniDraw is a GUI framework by members of the Gang Of Four, the same people who later discovered Design Patterns.

( categories: Java | Programmer )