LJ Archive

Programming KDE 2.0: Creating Linux Desktop Applications

Stephanie Black

Issue #87, July 2001

If you like KDE, this book is a fine piece of work and will undoubtedly speed you on your way to creating a “killer app” of the finest kind.

  • Author: Lotzi Bölöni

  • Publisher: CMP Books

  • URL: http://www.cmpmedia.com/

  • Price: $39.95 US

  • ISBN: 1-929629-13-3

  • Reviewer: Stephanie Black

Good programming books are hard to find. By “good”, I mean that things like an author's bias does not overshadow the value of information in the work, the writing is clear, appendices are used as addenda to the written work (and are not half of the text) and assumptions about user knowledge/skill levels are consistent and addressed in some kind of chronological order. Lastly, it's most helpful if the book engages—not enrages—the reader.

Programming KDE 2.0: Creating Linux Desktop Applications (CMP, 2001) introduces the reader to development of KDE applications. The approach Bölöni takes assumes at least a basic knowledge of C++ and systematically takes the user through the basics of the Qt libraries, use of components and all the way to “expert touches” to make your new KDE application sparkle.

If you like KDE, this book is a fine piece of work and will undoubtedly speed you on your way to creating a “killer app” of the finest kind. You will have spent your money wisely.

If you do not like KDE, if you have found it wanting (especially its meager memory resources), you will probably not appreciate Bölöni's “boosterism”, his detailed expiation on the history of graphical desktops (unified graphical desktops in particular) or his utter refusal to broach the subject of memory management in KDE applications. The only part you might find a bit amusing is the opening statement of Chapter 1: “The K Desktop Environment (KDE) is the most popular desktop environment for UNIX-like systems and probably the largest open-source project ever undertaken.”

If you take things like this seriously, the author has completed his unofficial (though not unofficious) task of alienating his readers. If you take these things with a grain of salt, it is almost possible to enjoy—and certainly benefit from—the information within the book. Almost.

(For the record, the largest open-source project ever undertaken would be the GNU project, without which neither Linux nor KDE would have usable and free development tools to aid their development.)


From a technical standpoint, there's not much to critique about Bölöni's work except its premise. The extensive overhead of C++, even without the KDE libraries, components, additional objects, etc. can be daunting for many Linux systems that are not running a minimum of 128MB of RAM. Such information is ignored, which I find a bit questionable.

Assuming the developer/user has a hefty amount of RAM and is comfortable with C++, Bölöni's technical expertise is evident. The explanatory text and illustrative code samples complement each other well. For the most part, no obvious glaring errors appear in either, until we get to the end of the book.

In Chapter 8: “Expert Touches”, Bölöni provides a wonderful discussion of communications in KDE, what protocols are involved, what classes actually do—things like addressing, “marshaling” data and registering an application. This is one section where the author provides some useful information. For example, his listing of code for “LocalChat” illustrates his points well. Although the code is lengthy, it is well-commented and is a real education in the grunt work of modern communications tools.

Another feat is from the “smart coders dupe stupid users” school of programming, by way of a flagrant attempt to explain away the continental-drift speed for which KDE applications are known. The phenomenon in question is termed “perceived performance”, as in the benchmarks say one thing, but the user perceives it differently. Whose benchmarks is he talking about? Which user(s)? Linux users? Or the subset we can only call “GNU-bies”? (Thanks to Jon Pennington for that wonderful term!) The ensuing discussion, on “tricking” the user by employing splash screens (to “hide” the length of time the application takes to load) is, one would have thought, beneath someone of Bölöni's caliber.

The author deigns to give us some “parting thoughts” in Chapter 9 that are either (or both) vague (“How to Make Money with KDE” says nothing about how, only that you can) or hypocritical (Java's advantages are paid for with a massive performance loss? Pots, kettles, lend us your callings!) and include the following boast:

All the reasons I mentioned for using KDE for custom applications hold for off-the-shelf software, too. But you must consider one more thing: the size of the market. Given that KDE is bundled with all the commercial Linux distributions and with all the major Unices, when writing a KDE application, you are targeting practically 100% of the Linux/UNIX world.

Please. There are a fairly large number of GNOME users that would choose Glade in a heartbeat over KDE, to say nothing of some very competent and critical coders using Enlightenment, WindowMaker and even Blackbox. Bölöni, by not taking these users/developers into account, misses a large portion of his potential audience.

Technical Problems

It's a wonderful thing when a book about software includes the software to which it refers. The author has tried to do this and with some forethought as to the various distributions on which KDE 2.0 might be loaded. Having run previous versions of KDE, I wasn't squeamish about testing it. This was, after all, a newer release that is better, from some reports, than previous versions. (Some outfits insist that “eats more RAM” is synonymous with “better”.)

Suffice it to say that a certain libmng was missing from the Debian binaries, resulting in a grumpy reviewer, an unhappy 64MB of RAM (which was slowed down to the point of unusability) and a crashing bore of a hard drive. Looking for the missing library entailed a wild goose chase of several hours and bore no fruit. libmng requires zlib. Requires it but can't see copies of it.



If you have a lot of RAM, like C++ and like creating desktop applications, Programming KDE 2.0 is quite an acceptable guide. If you're running Debian, don't use the CD that comes with the book; go to the KDE site (http://www.kde.org/) and download it. The book will come in handy as a reference. And if you don't like KDE, the title alone should put a stop to any impulse buying.

Stephanie Black is a writer—of words and code. When not writing, she runs a Linux consultancy, Coastal Den Computing, in Vancouver, BC Canada. In her off-hours, she's usually playing fetch with her cats or collaborating/colluding with her partner, a fabric artist and business manager.

LJ Archive