Slashdot Mirror


Review: GTK+/Gnome Application Development

Thanks to our own Justin for the review of author Havoc Pennington (excellent name)'s GTK+/Gnome Application Development. Click below to learn more.

GTK+/Gnome Application Development author Havoc Pennington pages 492 publisher New Riders: ISBN 0-7357-0078-8 rating 6.5/10 reviewer Justin ISBN summary Learn how to develop a GNOME application from scratch using gnome-libs and various GNU development tools. Master the canvas, and expand your knowledge of GTK+/GDK/glib while you're at it. The book is released under an open license so that the book will have no problems keeping up to date with whatever is current in GNOME. It is browseable on the web at http://developer.gnome.org/doc/GGAD/ and can be checked out from GNOME CVS - it is in the GGAD module.

The book is not just a simple explanation of gnome-libs. Rather, it is a book meant to take you from beginning to end of a full GNOME application. GGAD starts off just where it should, with a ~50 page review of glib and GTK+. These sections were fairly well written, and I was able to understand them well. Keep in mind, however, that they are not for beginning glib/GTK+ hackers. The internals of how the libraries work are sometimes mentioned and I can imagine them being confusing to the first time GTK+ hacker. More advanced hackers can probably skip most of these sections, but even an intermediate GNOME hacker could gain a better understanding of how glib and GTK+ work.

The next sections discuss topics like what non-code files are required for a GNOME application (Makefiles, .desktop files, documentation, pixmaps, etc.) They are useful, and I thought occupied the right amount of space (not too little, not too much :)

Next comes a chapter I probably expected to come a bit later on. "Gnome Application Basics" is a summary of internationalization, popt, and configuration data. Unfortunately, I found the sections on configuration data a bit difficult to understand, and disliked seeing example code using some of C++'s more advanced features. Now we arrive at chapter 6, the chapter I think most GTK+ hackers looking to get into GNOME development will find most interesting. It is a discussion of the GnomeApp widget, GnomeUIInfo structs for menus, status bars, online help, tooltips, etc. Chapter 7 will probably also be useful to the same people. It is a quick (10 page) discussion of the GnomeDialog widget, and discusses several types of widgets. It well-written and very complete. Finally we have arrived at the last section of the book - "Advanced GTK+/Gnome Techniques". It is definitely for the more advanced hackers in the house. Chapters 10 and 11 are a very intensive (read: decently written chapter covering some slightly obscure topics in a lot of depth) overview of the GTK+ object system and a somewhat lengthy how to on the use of GDK (some parts I think may come in hand, some parts are probably pretty obscure). Chapter 11 is a titled "Writing a GtkWidget" and is well-written, but I question its usefulness to anyone but library developers. Unlike other sections, I felt this chapter had far too much actual code embedded within it (at least in the second half).

Next is a chapter I expect many people have been waiting their entire lives for ;) It is the long-awaited GnomeCanvas chapter. It is a ~25 page chapter which explains how to use the GnomeCanvas widget. The next chapter, Writing a GnomeCanvasItem makes a good counterpart, and the two work well together to teach the use of the canvas. It is a complex widget, so it may be hard to understand, however. I was lost at times, but I think this was probably me and not the book.

And that's most of it. The next 140 pages or so are all Appendices, some I found useful and interesting, others I found boring and skippable. However, I really must say that Appendix C, "Frequently Asked Questions", was very good and one of my favorite parts of the book :) The only remaining disappointments I had were the fact that the book was aimed towards very advanced developers (which was probably the major disappointment for me), and that libxml was not covered in at least small detail. I know that not everything can be covered, but XML is becoming central to many parts of GNOME.

Purchase this book at Amazon

  1. Overview
    1. Introduction
    2. glib: Portability and Utility
    3. GTK+ Basics
  2. Building a Gnome Application
    1. Creating Your Source Tree
    2. Gome Application Basics
    3. The Main Window: GnomeApp
    4. User Communication: Dialogs
    5. Gnome Applicatio Checklist
  3. Advanced GTK+/Gnome Techniques
    1. The GTK+ Object and Type System
    2. Gdk Basics
    3. Writing a GtkWidget
    4. GnomeCanvas
    5. Writing a GnomeCanvasItem
  4. Appendices
    1. GTK+/Gnome Object Hierarchy
    2. Table of Header Files
    3. Frequently Asked Questions
    4. Online Resources
    5. Code Listings
    6. Open Publication License Version 1.0

2 of 65 comments (clear)

  1. Not a "gentle introduction" by Booker · · Score: 3

    I got the book from FatBrain last week, and I've been plowing through it. I'm new to Linux development, and I don't have a whole lot of programming experience outside of Linux, either. This book is not an easy read. :-) If you're new to programming, skip it for now. If you're new to GTK/Gnome, I'd at least read the online GTK and Gnome tutorials first, and maybe have the GTK book by Eric Harlow(?), also from New Riders, on hand to cover GTK in a bit more depth.

    Don't get me wrong - it's a great book, chock full of good information. It's also the only book in print at this time which covers Gnome development, as far as I know. But if you're brand new to this whole business, it might be a tough read. I'm very glad to have it, though, because someday I'm gonna understand it all. :-)

    Kudos to Havoc and to New Riders!

  2. Information about the book by Havoc+Pennington · · Score: 5

    Please see http://developer.gnome.org/doc/GGAD for more information about the book.

    Keep in mind that one book can't be everything. This is a sort of "intermediate-to-advanced GTK+/Gnome programming manual". An introductory tutorial, complete reference, CORBA book, XML book, etc. would all fill pretty thick books on their own. I already wrote 492 pages instead of the planned 350. :-)

    But I think you'll find lots of useful information in my book, and of course you can check it out online at the above URL and decide for yourself.