I 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 |
I was looking at buying this book, and I had been pondering for some time. This review pretty much sums up what I needed to hear.
You can download the correct index from http://nostarch.com/frameset.php?startat=gnome_toc .
No Star Press is going however to release a free version of the book under Creative Commons, non-commercial license.
Oh, now I understand all this mess in this days about .net and mono, eugenia is learning it
I can’t bring myself anything about Mono, but GTK is looking better as long as the documentation is up to date, and perhaps even reveals the direction they are going in ahead of time. An auto-complete IDE is still needed to ease the amount of typing that C language code requires. Real good and up to date information about makefiles and automake would be incredibly helpful. The last area that is interesting to know about are things like protocols and program design in the Unix tradition, separating mechanism from policy and creating simple, clear, and general program modules. The old C code will be around for a long time to come.
Hi Anonymous,
Anjuta autocompletes as-you-type your code: this applies not only to APIs in the libraries (like Glib) but also to variables, functions et cetera that you just defined.
This is working really well in the last stable release, and in the complex, even if there are still some sharp corners, overall Anjuta feels good.
Ciao, chris
I tried it before and it wasn’t up to par, but I’ll try the new version. I’d like an emacs that autocompletes GTK+, Glib, Pango, etc.
Anjuta autocompletes as-you-type your code: this applies not only to APIs in the libraries (like Glib) but also to variables, functions et cetera that you just defined.
I’m not familiar much with Gnome tools, but didn’t Anjuta get stopped at some point and a an IDE called Scaffold came along? It looked pretty good.
Anjuta is very much around and being actively developed.
Of possible interest to folks looking to write Java Gnome/GTK+ apps:
http://java-gnome.sourceforge.net/
I guess Bonobo is missing .I feel they are ditching it
This is a programming book! Pictures are a waste of space; if you want to see what the app looks like, try compiling and running it.
I thought this book was excellent. It could have easily topped 600+ pages with some fluff added, but I’m glad it didn’t.