Foundations of GTK+ Development (Expert's Voice in Open Source)
| 2007-04-23 00:00:00 | | 0 | Programming
GTK+ is one of the most influential graphical toolkits for the Linux operating system. It is the technology upon which the GNOME and XFCE desktop environments are based, and its crucial to have clear understanding of its complexities to build even a simple Linux desktop application. Foundations of GTK+ Development guides you through these complexities, laying the foundation that will allow you to cross from novice to professional.
Foundations of GTK+ Development is aimed at C programmers and presents numerous real-life examples that you can immediately put to use in your projects. Some familiarity with C programming is assumed, as the book delves into new topics from the beginning. Topics like object inheritance are covered early on to allow for complete understanding of code examples later. And the provided examples are real-life situations that can help you get a head start on your own applications.
User review
probably not worth more than $10-$15
first of all, as someone who has already done a handful of small, basic GTK+ projects, i bought this book in hope to find some more information on how to build custom widgets, and how to incorporate custom widgets into a new/existing project. that was my goal.
this book is for the person who has no Internet/web-searching skills whatsoever, as well as the person who has no native/core understanding of how computers work. it is definitely a 'how to program' book for those who have no clue on how to program. the book goes into pretty good detail of all of the native widgets available in GTK, plus it talks a little bit about Glade. there is a chapter on Glib, and there is 1 [small] chapter on creating custom widgets.
i find the [long] chapter on Glib useless. this is because Glib is actually one of the best documented OS libraries out there. the Glib documentation page is pretty thorough, and there are lots of examples out there. in my opinion, this was a waste of a chapter/paper. a quick visit to a codesearch page will provide lots of easy examples of what you are looking for in Glib. i can understand a reference book dedicated to Glib (a good idea, actually,,.), but glazing over it in a long chapter isnt worth it, because i can get that same cookie-cutter, mediocre information on the web pretty quickly.
the areas that this book shines are chapters 7, 8, and 9. these are chapters over the text view widget, the tree view widget, and menus and toolbars. the text view widget has many facets because of the buffers involved, and this book covers them. the tree view widget can be as simple or as complicated as you want, and this book touches on some good concepts. same goes for menus and toolbars. these are the least documented widget sets on the internet (there is a big tree view tutorial out there, but it is old), so these chapters are nice to have.
the chapter on custom widgets didnt help much. his 2 examples of custom widgets are: a small program that displays an IP address in textboxes (each octet in a textbox, and with rules applied so only numbers can be entered, valid range,,.), and a scrolling marquee (just scrolling text). there is some mildly useful info in these chapters, but it is too lightweight to really help and be worth much. there are only a handful of tutorials on the internet on how to create C-based custom GTK widgets, and they all contain the same information that this guy is giving us.
if you want to learn some detail of every widget in GTK (or at least in Glade), then buy the book. but, i would say that with 2-4 hours of time and $0 of investment, you can sit down and screw around with Glade enough to figure out almost everything that this book has to say about the widgets and Glade. i opened up Glade for the first time, and within a few hours, understood almost everything there is to know about Glade and what it is doing, as well as all of the widgets contained therein.
in summary, this book is for anyone who has no clue what they are doing, and is either no good at using search engines (or just doesn't want to). if you're doing a GTK project, you have more than likely been scouring the Internet for hours already, and I would say that most of this book contains information that you have already seen. it really doesn't bring anything new to the table, although the chapters 7, 8, and 9 are useful, as information on those subjects isn't really centralized anywhere on the Internet.
this book could have shined if it had gone into 2 or 3 in-depth, full-fledged projects involving both GTK widgets and custom widgets (with a little bit of Cairo). there is no great reference [online or book] on how to build a project with both normal & custom widgets (with some Cairo), and this book refused to touch on those subjects as well, which stinks. it is mostly regurgitated information that you are either likely to see or likely to have seen in your initial learning/development of GTK+ projects.
User review
Annoying writing, but good content
I'm a few chapters in, and no major complaints so far.
First, and most important with a technical book, I haven't noticed any glaring technical problems with the information. The example code and explanations seem reasonably correct and work as expected. I should note, though, that I'm using the Ocaml language binding, and not using the example code verbatim.
I also like that the author provides a higher level explanation of using Gtk. The Gtk documentation is great for explaining each and every function, but not so good at explaining what I'm supposed to call in the first place. The book gives a good explanation of the concepts behind the API, which I was having difficulty figuring out solely from the API documentation.
My biggest complaint is the author's writing style. Personal preference, but I really dislike the use of `you` in technical books, and this one uses it all over the place. Sentences like `In Chapter 11, you will be covering how to create your own signals when you are taught how to create custom widgets,` drive me crazy.
It's also a bit wordy. Again, personal preference, but it's annoying enough that I knocked it down to 4 stars.
User review
The best book I ever had
This book is always available online free of charge but I like to have a paper copy.
It has a great mix with theory, examples, etc and is great for `learning by doing`.
I had this book for some time, and I like it very much. It is great both as a reference (but there you could use Internet instead) and as a study material.
User review
besides the online errata sheet, found another bug
It's a good book and I learned a great deal. Just one problem about using gtk_combo_box_get_active_text ,,.
In one example the output from gtk_combo_box_get_active_text is freed using g_free. In another example it is not freed.
I'm all confused what I should do with the output string. To complicate things, the official gnome GtkComboBox documentation does not state anything one way or the other.
User review
Good but could be even better
I may be the first person to rate this book less than five stars. And please don't get me wrong this is a good book in the sense that it is right up to date and the examples are very helpful. There are, in my opinion, two main areas where the book could have been improved. It dives off into a discussion of some very interesting applications of GLib including socket programming which the author says must of needs be incomplete. This doesn't really fit in with the main thrust of the book and probably should have been the basis, in an expanded form, for a separate book. This space could well have been used for a more expanded treatment of the issues at hand. Secondly the author's views on user interface design have overly influenced his treatment of GtkFixed, GtkLayout etc. One suspects that his work as a developer has been primarily in producing tools for anyone anywhere rather than applications for corporations and / or small businesses. However, regardless of the above, armed with this book plus the API documentation will get you going much faster and more efficiently than if you have only the API documentation.
No comments:
Post a Comment