posted by Eugenia Loli on Tue 25th May 2004 03:27 UTC
IconI am much into learning all-about-Gnome development lately, using GTK# and Mono. Unfortunately, the Mono/GTK# documentation is not that complete in regards of developing Gnome applications and this has being quite a stumbling block. The release of the "Official GNOME 2 Developer's Guide" book felt like a godsend to help clarify a few points about the GTK+ and Gnome architecture. But was it really?

The book (foreworded by Gnome founder Miguel de Icaza) starts with the introduction of GLib and its importance as the underlying layer of GTK+ and as the vehicle for portability. The book continues with a comprehensive introduction of the GObject. The author makes it very clear that Gnome is as object oriented as any other modern GUI development framework, it's just that its object-oriented side exists in the API itself rather than the language. The rest 150 pages are completely devoted to GTK+: a "hello world" program (which seemed to me rather long and unnecessarily complex compared to an equivalent Qt, GTK# or BeAPI) and then introduction and sample code of the most-used widgets.

What follows is 50 pages of study about the Gnome libraries and the additional widgets that these libraries offer on top of GTK+ (Red Hat's Havoc Pennington said in an interview that portions of the Gnome libraries and GTK+ are bound to merge in the future). After you have mastered the core API itself, the author is presenting the developer tools, from Glade to the GNU auto* tools and internationalization. What follows is a very interesting chapter on GConf and how to properly set your application to use GConf keys rather than text files for saving preferences and other information and later you will find a chapter on GnomeVFS (synchronous access and asynchronous I/O, URIs, etc.).

The book was written around the time of Gnome 2.0-2.2 but was released recently in the English language, and so newer material like the new GTK+ file selector or Gstreamer are not discussed. Even back then though, Gnome was capable of games, OpenGL views (via GtkGLArea), generic music and video, which are also not discussed. Also, while there is a whole chapter on the auto* development tools, there is not a mention of how to properly debug a GTK+ application using existing tools, or how to use Alleyoop and Valgrind to trace memory leaks. And there are not any tips & tricks on how to profile or optimize your application.

The real problem with the book though is its format. There is way too much code to stomach per page and little explanation. The book feels a lot like the whole GTK+ and Gnome code was put under Doxygen and then it had the author going back to it and add tidbits of text. I must say that the Glib and GObject chapters are well written with lots of explanatory text, but as you enter the GTK+ chapter and beyond, it becomes a repetitive read of functions after functions with lots of sample code and minimum text without much personality put in it. Additionally, there are not as many pictures as there should have being for a toolkit/GUI book (compared to let's say, "Cocoa Programming for Mac OS X, Second Edition" and others).

Another problem is the fact that the "Index" at the end of the book is not precise. I don't know if this happened because the book is a translation of its German original, but the fact is, when you search for something through the Index you are more likely to find it 2-4 pages in front of what the Index suggests. For example, GdkPixBuf is suggested to be on page 132-139, but it is on page 130 in reality.

Overall, I would truly suggest this book to developers who have good experience with C and they don't mind diving into lots of code to figure some things out that the book didn't bother explaining to you. The rest, are still recommended to get the book, mostly because the online documentation/samples/tutorials/guides on Gnome and GTK+ are incomplete or not updated regularly, so every little bit more should help. But in any case, don't expect this book to be a "Bible" for existing Gnome programmers or for new programmers migrating to GTK+. It's a worthy addition though.

Overall: 7/10

Buy "The Official GNOME 2 Developer's Guide"
at Amazon.com
e p (0)    12 Comment(s)

Technology White Papers

See More