![]() |
|
KDE 2.0 Development, by David Sweet, et al., is therefore interesting for two reasons. Most obviously, it is the first published book on developing for KDE 2.0, and KDE 2.0 is itself a major release by any rational standard. That alone places this book right at the top of any KDE developer's list. The other reason relates to the authors -- a total of nine including David Sweet -- who are all KDE developers and/or writers working on KDE documentation, making this book a test of the hypothesis that even the best programmers are documentation-challenged.
So how did the authors fare with this test? KDE 2.0 is definitely a major step up from trolling the Net looking for hints and tips on KDE development, and it's a virtual must-read for anyone new to KDE 2.0 development, if only because it's currently the only game in town. But it's still far from the killer KDE 2.0 title many Linux programmers had hoped for.
KDE 2.0 provides a somewhat broader overview of the KDE development landscape than I expected, in that it contains a healthy amount of information on packaging programs, documenting your code, using CVS (the concurrent versions system), and licensing issues. This certainly isn't a problem, and in fact it should be a great help to programmers moving to KDE from Windows, the Mac OS, or simply non-GUI Linux work. The book's highest level of organization reflects this global view, as it consists of four parts: "Fundamentals of KDE Application Programming", "Advanced KDE Widgets and UI Design Techniques", "Application Interaction and Integration", and "Developer Tools and Support."
As expected, the authors deal early on with the relationship between KDE and its underlying widget toolkit, Qt. They devote chapter three to this topic, and talk about Qt's signals and slots mechanism and its major objects, like QObject, QWidget, and QPainter. This presentation is generally good but too terse in light of the importance of Qt to KDE programmers. This terseness is a problem that crops up in other places and ways, as mentioned below.
KDE 2.0 has some very strong sections, such as its treatment of KUnique, a new-to-KDE 2.0 facility for writing programs that can only ever have a single instance running at a time, and its discussion of DCOP (Desktop Communication Protocol) and KParts, which comprise KDE's object technology. Another welcome part is Chapter Nine, "Constructing a Responsive User Interface", which goes into some detail about how to deal with long-running jobs in a GUI-based application without locking out the user from interacting with the program. This is one of those nasty, real-world topics that many books overlook when tackling a topic as far reaching as GUI programming.
The one serious problem with KDE 2.0 is that it suffers from the classic myopia problem of documentation written by people too close to the topic: It often makes sweeping assumptions about the reader's knowledge, assumptions that are only true if you already know enough about the topic to be using the book as a reference and not a tutorial. There are several places in the book where a source-code sample includes details of Qt and/or KDE not explained in the book, or some assertion is made in the prose that is meaningless to a new KDE developer. My guess is that these situations are so "obvious" to the authors that it simply never occurred to them to explain these mystery details. That may explain the situation, but it doesn't help the rookie programmer trying to figure out, line by line, how some code samples work. A related issue is the lack of coverage of issues like KDE/GNOME compatibility, which is increasingly turning into one of the great unknowns as the two projects continue to develop on their separate paths and programmers are more inclined to specialize in programming for just one of them.
I was surprised by some of the recommendations the authors make without explanation, leaving you to wonder about the reasoning behind the advice. For example, Chapter Three recommends against using the C++ Standard Template Library (STL) in KDE programs, while Chapter Six says that "sounds should be used only in games". There might be a solid technical reason for the former, albeit unstated, while the latter sounds like nothing more than personal preference.
The entire text of KDE 2.0 is available online in Acrobat/PDF format, along with the source code for the sample programs. The book is being released under the Open Publication License, which the book's introduction describes by saying, "If you are familiar with the GPL [GNU Public License], you can think of the OPL as a 'GPL for books.'" Still, for $50.00, it would have been nice to get the source code and the PDF files on a CD with the book.
-- Lou Grinzo