| Umbrello UML Modeller: A Diagramming Programme for the Unified Modelling Language Developed Using Bazaar Methods; BSc Honuors Dissertation, Final Report; University of Stirling, Department of Computing Science and Mathematics; April 2003 | ||
|---|---|---|
| Prev | Next | |
Umbrello UML Modeller is written in C++ for Unix-style operating systems. C++ is the most widely used programming language for desktop applications, its object orientated basis making it suitable for graphical user interface programming. It compiles to native code making it much more efficient than alternatives such as Java. Unfortunately its heritage of being backwards compatible with C means it is a complex language with many features and oddities.
Unix style operating systems have traditionally been excellent for servers and technically competant users but the high prices and expensive hardware have prevented it being used on the desktop. However the rise of the Free Software movement and the freely available Unixes, GNU/Linux and the BSD variants, which work on cheap PC hardware have allowed it to be used by non-enterprise users. As the demand for a user-friendly desktop and applications increased several projects sprung up to create them. The original and most successful is KDE (the K Desktop Environment, a play on words of CDE, K originally stood for Kool but that was quickly and quietly dropped). KDE provides a large set of libraries, an advanced component system called KParts, inter-process communication technology called DCOP, a large number of applications and all the integration that would be expected of a desktop environment including drag-and-drop, unicode clipboard, configuration tools, a taskbar with application menus and a desktop background.
KDE itself is built upon Qt[qt], a commercial cross-platform library providing primarily GUI widget functions but also classes for files, sockets, data structures, XML parsing and much more. Qt extends the C++ language to add an inter-object communication mechanism called signals and slots. An object's slots are methods which are called by emitting a connected signal from an object. Slots and signals can be arbitrarily connected at run time. It allows for independence between classes which is useful in patterns such as Model View Controller.
Like most Free Unix applications, KDE programmes use GNU Autoconf and Automake to simplify the compile process and to ensure it works on as many platforms as possible. Autoconf and automake are complex programmes with many configuration details, however the power of KDE is that most of the hard work has been done for you. A script called kapptemplate[kapptemplate] generates the autoconf and automake files given some simple parameters. KDE also makes use of GNU Libtool which takes care of the differences between compilers and linkers for shared object files (dynamically loaded libraries). Libtool uses plain text files to keep track of the dependencies required by each library.
The original author abruptly stopped his work on Umbrello earlier than had been expected when his computer spontaneously exploded in the middle of a commit of the code. I received a tearful e-mail from an internet cafe about the incident. This left the code base in a state where it did not compile. The commit had been a large one which contained many different features. I could have reverted the code to the version from the day before but this would have meant the loss of all the features which were to be added. I spent two days going through the code working out which features had been completely committed and which had been only partially committed so had to be removed by hand or reverted back to a previous revision.
This surprise start to the project got me familiar with the code base and taught me that incremental commits of features, rather than committing several days work at one time, is very good practice.