85 of 88 people found the following review helpful:
4.0 out of 5 stars
Finally a book to cover this great library!, August 6, 2005
This review is from: Cross-Platform GUI Programming with wxWidgets (Paperback)
"Cross-Platform GUI Programming with wxWidgets" from Bruce Perens' "Open Source Series" is the first and only book covering cross platform development using wxWidgets. wxWidgets is "a first-class, open source response to the need for portability in an increasingly heterogeneous computing world". It is a very mature library with over 13 years of active development behind it. Although primarily a C++ library, wxWidgets has language bindings for Python, Perl, Basic, Lua, JavaScript, Java, Ruby, Eiffel, C#, Haskell, and Euphoria and many of the techniques taught in this book could easily be adapted to any of these languages (provided you can read and understand C++). The authors--Julian Smart, Kevin Hock, and Stefan Csomor--are three of the primary developers of wxWidgets with Julian being the founder of wxWidgets.
Before I get into the actual review, please note that this book is for people who have a decent grasp of C++. You won't need to know advanced features such as templates and exceptions but having a decent understanding of memory management, pointer logic, OOP, and inheritance is highly recommended. You will not learn C++ while reading this book as it forgoes detailing language features that are used. Having an understanding of event based programming would be useful but is not required. I'd also like to note that I (the reviewer) have over two years of full-time, professional experience with wxWidgets and am an occasional patch contributor.
The book starts off at a fairly fast pace. I was worried they were glossing over too many details but many things I felt were lacking were covered in sufficient detail in later sections. It does not baby your intellect like far too many programming books do in the first few sections. There is a full, working GUI application within the first 20 pages (and you don't see actual code until page 16. The coverage of Event Handling is complete although the coverage of the difference between Command events and regular events could have used a bit more detail.
Windows are covered shortly thereafter and the coverage was basic but essential and with the sheer size of the base window class, this is all you can really ask for. Every noteworthy issue seems to be covered (as well as a couple I didn't know about). I recommend anyone reading Chapter 4 have the wxWidgets' documentation open to the wxWindow class while reading. The book covers nearly all of the window types you'd ever use and has specialized details on each.
All of the basic (and several of the advanced) controls are covered in a similar fashion to the wxWindow section which I consider enough to get by as well as give you a nice overview of what you have in your toolbox to work with while designing. Menus, Toolbars, and Statusbars are given enough pages to get you going and cover most application's needs.
Drawing is covered in excellent detail with many "gotch'a" that I hit while learning wxWidgets explained and solutions provided. The Printing architecture itself is a bit lacking in necessary examples. 3D graphics using wxGLCanvas is given a brief cameo but no real coverage but if you know OpenGL, this short coverage is enough to get you going.
User Input through the keyboard, mouse, or joystick is covered but only small examples are given. The systems themselves are well designed though so picking up on any missing details should be easy.
Sizers are finally covered in chapter 7. Personally, I think they should have been covered way earlier (before controls were covered in-depth). Sizers are such an integral part of GUI design and are almost always the biggest hurdle people hit learning wxWidgets (taken from both my personal learning experience as well as my observation while helping out in the wxWidgets' forum and IRC channel). They receive more of a reference style coverage rather than a tutorial which I feel is the most disappointing part of this book (look up the sizer introduction by Brian Victor for a nice, example packed introduction to sizers which compliments the coverage in the book quite well).
The section on standard dialogs is complete and adequate while maintaining brevity. The "Writing Custom Dialogs" (chapter 9) was nice as it showed how to write a dialog that covered a wide range of platforms (including Smartphones). The often mentioned XRC resource system is covered in short detail but it should be enough to get someone interested in using XRC off the ground.
Working with images has a nice section dedicated to it. The standard datatypes section gives lots of pointers and tips which I wish I had when I was learning wxWidgets. wxDateTime has so many considerations to take into account and I don't hold it against the authors for only covering a few of the most prominent.
The wxWidgets' Filesystem section gives plenty to get people started with handling the intricacies of working with files in a cross platform way.
I enjoyed the section in Internationalization and learned a few things I didn't know about. It also covered Unicode in much more detail than the official wxWidget's manual ever does.
Multithreading is a complicated issue and though the book's coverage is decent, you'll definitely want to refer to another source if you plan on using something as potentially dangerous and complicated as multithreading (particularly when used in a event based GUI system).
Socket programming with wxWidgets has a decent number of pages dedicated to it and it was all new to me. Unless you are doing some complicated socket work, I'd say the book covers enough to get a nice, cross platform socket system going.
One of the best sections was the chapter on using wxWidgets' Document/View architecture. The wxWidget's manual is a bit lacking in describing the roles of all the various classes and when I was trying to decipher it for myself I vowed to not let anyone else suffer through trying to figure it all out (I have a half written tutorial to prove it ;)). Now, with this book out, no one will have to spend all of the time I spent learning to take advantage of this powerful and time saving system.
Appendix A covers installing and building wxWidgets (another major hiccup for new users). I recommend reading and following this before even beginning to read sections that cover actual coding. Appendix E has a lot of nice references to community provided classes, many of which I use myself regularly.
wxWidgets is a powerful system which had--until this book came out--a steep learning curve and a lack of useful resources for learning. Apart from the sizers chapter, I have no major complaints and anything I've noted should be considered minor. This book is long overdue and it is shocking that a library as powerful as this one went so long without one. You'll leave this book with a good understanding of this wonderfully encompassing and powerful library.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
25 of 28 people found the following review helpful:
4.0 out of 5 stars
The Good, the bad, and the ugly, December 8, 2005
This review is from: Cross-Platform GUI Programming with wxWidgets (Paperback)
The Good:
This is (currently) the only book on wxWidgets (formerly wxWindows). The book is packed with information. All of it relevant, all of it covering as much as they could cram into one book and not make it into a tome so heavy that you couldn't lift it. As a reference book it excels in that it does present everything you need in order to get up and running.
The Bad:
As a reference book - it is not as well laid out as many of the other reference books I've read and/or bought. Many of the standard methods to present data are not used. That is to say: In most reference books a section is well delineated whereas in this book the terms and explanations for those terms are not separated in such a way that it is obvious to the reader that they have stopped talking about one subject and begun another. For example:
Page 121:
Use Check to toggle a check or radio item on or off, passing the menu item identifier and a boolean value. Use IsChecked to get the checked status.
Delete deletes a menu item specified by identifier or by wxMenuItem pointer....
In other books the above would appear as:
Check Used to toggle a check or radio item on or off,
passing the menu item identifier and a
boolean value.
Example: ......
IsChecked Used to get the checked status.
Example: .......
Delete This deletes a menu item specified by an identifier
or by the wxMenuItem pointer....
And so on...
This isn't a big complaint but it does make the book hard to read sometimes. Especially when you have thirty or forty specialized words. You wind up hunting for where the words are that you need in order to do anything. Which is why other companies developed the above method to layout specialized words you had to know.
The ugly:
I haven't finished reading the book but I did skim through the rest of it. The bad is broken up into two things: size, helpfulness. Here they are:
Helpfulness: The book is very through in going through every special word but they really do not provide full examples of how to use the various words. That is to say that there are code snippets but not complete code. What this equates to is that there isn't a complete example of how to link everything together anywhere in the book. So you are expected to know how to do this. Yet, even with DialogBlocks you wind up going "How do I make my About dialog show up?" Because there just isn't an example on how to do this. Even the Acme example which comes with DialogBlocks doesn't show you how to do this simple task. Instead, the reader is left to flounder UNTIL you find out how to go to the mailing list. (And I have a pet peevee about that.) With PHPBBS et al being out there, (not to mention SourceForge.net) it would be better if they set up a BBS to handle such things as example programs. With a mailing list the information scrolls by and is eventually lost if it isn't reposted. With a BBS you set up an area to handle the FAQs, put in a few examples of how to use DialogBlocks, have a "Q&A" or "Bug" area, and most importantly - if something is posted that really is important - you can just move it over to a permanent location such as the FAQ so the information isn't lost.
Size: The book on wxWidgets tries to cover too much area. Like books on Windows, X11, Unix, Macintosh, and others - it needs to be broken up. The author himself says that there was too much to cover in wxWidgets to get it all into the book. They should have, at that point, sat back and gone "Maybe we should break it up into smaller books." They would have been right to do so. By trying to cram so much information into one book they have made it hard to read and they sacrificed putting complete examples by just providing snippets. This is not to say that EVERY SINGLE COMMAND has to have a complete code example. But each command should have at least a one line example of how to use it and a complete example should be given at the end of each chapter on how to use these commands. Nothing big - just something. Like maybe build each section of a complete program in each chapter and then give the entire program at the end of the book.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
22 of 27 people found the following review helpful:
2.0 out of 5 stars
Offers nothing new from the online manual, October 26, 2005
This review is from: Cross-Platform GUI Programming with wxWidgets (Paperback)
I found this book pretty disappointing. It covers very little more than the online manual and most of the examples are total cop outs. They either tell you to just review the example that comes with wxWidgets or offers a really terse example that more than likely doesn't really show anything.
For example, I was really hoping that this book would show me how to print a custom drawn window (or even something like a listview). Instead its printing example show how to use the high level functions, but then says that the developer needs to add most of the real printing logic to their own code themselves (and of course shows not even the slightest example of this). Gee, thanks a lot!
All in all, I saw nothing new in this book that I haven't read on their website. The author makes a point that this book is not a reference, but I have to add that it isn't much of a "here's how to do this" book either. It's more of a PR book showing the merits of wxWidgets and an intro book for novices who don't have access to their website, rather than a useful example or reference book to help out those already using this library.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No