The Definitive Guide to SWT and JFace (Expert's Voice) Paperback – 1 Oct 2004
Customers Who Bought This Item Also Bought
Enter your mobile number below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
Getting the download link through email is temporarily not available. Please check back later.
To get the free app, enter your mobile phone number.
About the Author
Robert Harris is a software engineer focused on distributed object computing. Since earning his master of science degree from the University of Florida, he has been designing and implementing flexible, resilient solutions in the telecommunications, transportation, and medical industries. His personal interests include speaking French with his daughter, Mallory, catching bugs with his son, Charlie, and infuriating his wife, Alison.
Top Customer Reviews
I had heard about SWT and all that it offered, however I was still waiting for a book to be published. When this one became available I was sceptical about it claiming to be "The Definitive" when it was a first edition. How wrong was I...
The book gives a brief summary of all the Java GUIs and their strengths and weaknesses and then gets stuck into SWT. With lots of examples (code is available on the publishers website), a clear layout and an easy writing style it's very easy to pick up and read. You can either read from start to finish, or if you are looking to accomplish certain tasks (like creatingn a preferences dialog / menu bar / progress bar), you can dip into the appropriate section (my preferred method).
There is a downside to SWT. SWT is powerful, however it makes coding in the Model-View-Controller architecture difficult as well as some other tasks. Enter JFace...
JFace abstracts on top of (the already abstracted) SWT. What took 10 lines with SWT, only takes 2 with JFace. You can link your interface to your data and not have to worry about synchronising the two. You'll still need the SWT knowledge, but it will make coding less tedious and hopefully tidier.
You will need to know what you're doing with Java to understand this book - things like abstract classes, protected methods, interfaces etc should be familiar to you. If you've coded a GUI application before then this should be no problem. The standalone examples work, but you'll need some knowledge to integrate them into larger applications.Read more ›
As for the rather complex GUI I'm putting together: this book didn't help at all.
Most Helpful Customer Reviews on Amazon.com (beta)
The book starts from scratch, explaining the history and motivation for a different approach to a GUI toolkit (SWT's native peer widgets vs. the emulated widgets of Swing, etc.), proceeding to your typical Hello World app with a single window and a single label, and ends up covering most everything I can think of needing to build even a relatively complex GUI using SWT and JFace. The book is a huge tome, partly because it includes listings of all the various methods provided by the classes introduced along the way. On one hand, it's a good thing because the book is pretty much all you need (i.e. a decent replacement for Google;), and on the other hand, the book would be a lot more pleasant to read if you'd drop a few hundred pages...
One thing I specifically liked about the book is that the authors have done a good job employing screenshots where needed -- especially in the chapter about layouts.
I'll definitely recommend this book for anyone looking to learn SWT. I'm not really a GUI developer (only having done Swing for personal stuff) and the book works for me as an introduction, tutorial, and a reference.
Both books share the same introductory style. They walk through the toolkit from front-to-back and demonstrate each concept and widget by showing code and screen shots. Each book suffers from the same long term problem in that it cannot be used as reference material since neither book provides an appendix that would serve that purpose.
That being said, I still prefer this book because it is much more in-depth and presents a shallower longer learning curve than the Addison-Wesley book.
I am surprised to find no coverage of SWT and Java 1.5's threading abilities. I wanted to see a coverage of how to handle long-running worker threads that must call delegates that run on the UI-thread (like a web services caller threaad telling the gui-thread to update the progress update bar to show 75% completed). I wanted to see coverage on how to send events information back and forth between GUI thread and the worker threads. It's one of my favorite chapter in Sells' book because without it it is very difficult to write a responsive app. This is criticial in this day and age with the decent amount of web services and distributed computing being used in Intranets and Internets. If Harris and Warner are willing to write an extra chapter on this very topic, I would be greatly in their debt. We are all waiting for this chapter! I guess some of you will say, wait for Doug Lea's next book, but I trust Harris/Warner to get to the point faster and better--and stay on topic (I am not sure if Doug Lea would bother with SWT). I am hoping there's an answer to this, because I need to use this asap.
There are some other surprises I find distasteful: data access and binding of data recordsets to grids are no where to be found.
These are the main reasons why this book gets a four star. Because people like me are spoiled.
Anyway, back to the book review:
Real-world cross-platform development is a tough subject. If you ask most people, they'll relunctantly say the best way to go about it is to write platform neutral c++ model/controller code and write the view code in Qt or Gtk/MFC or WinForms/Carbon or Cocoa. Nasty.
It goes without saying most small development shops simply can't budget serious competence in one, let alone three major GUI frameworks. This is not counting all the trouble you have to go through to evaluate count-less so-so [for one reason or another] libraries (wxWidget, MainWin, Swing, OpenStep API, Flash, Mozilla) just to arrive at the point where you can clearly say aha, I really want MFC/Carbon/Qt after all.
[And let's not even get into strictly system programming libraries, for which there are several dozens on the sourceforge galaxy alone.]. So for light work, where you aren't trying to please 500 million users right away (Internet Explorer, Outlook Express) or even 200,000--you really want something like Java 1.5+SWT:
> One productive language.
> One well-supported effort to map a common gui api to all major windowing systems while preserving native looks.
> A quick build that produces three executables. One for RedHat Linux. One for Mac OS X. One for Windows NT 5+.
Which is why I am really happy Sun and IBM is trying so hard to make this option happen. I build small softwares for a relatively small audience. With IBM's contribution of SWT, all we need now is a good text that cover it thoroughly--from the perspective of developers--not the library writers. The Definitive Guide to SWT and JFace gives you just that.
At times, I can see how some of the other reviewers might say, "It's just table listings rehashing documentations", and if you compare this book to Chris Sells' book you may wonder the same thing--but I think it's still an excellent try and the authors add something to the docs. I'll point out a few examples:
* In the "Selecting Files for Open and Save" they went out of their way to write the correct version of how to handle over-writing an existing file. Hey, just imagine if the authors said nothing... ;-)
* Throughout the book they document what the behavior will be if you did something undocumented: they'll mention when you shouldn't subclass SWT; they post questions to the eclipse group to clarify some of the bad decisions that had to be made and they tell us what we should do about it.
* They explore some patterns they expect real world programmers will likely try (like Decorations, which is like a half-implementation of MDI), and warn you ahead of time what you can expect to find or even whether you should use it.
The best part about them adding a bit of details is that you'll likely dig through the MSDN with Sell's book (which is not a bad thing), but you'll probably have everything at your finger-tips with Harris/Warner--so is it a bit wordy? Is it too referency? Maybe--see for yourself. :-)
This is a great book, and I wouldn't hesitate recommending it. It's a key to a world of cheaper better cross-platform development--walk--no run to your bookstore and get it!
Each section of the book provides a topic for discussion, a code example and a complete description of all the classes and methods used. I particularly appreciated the code examples and the tips for real world implementation. The code is clean, complete, and easy to understand.
I found this book easy to read. The author interspersed just the right amount of theory, history, and commentary to break up the details and keep me interested. It is obvious that he has a comprehensive understanding of the subject matter. The surprising part is how adept he is at communicating this knowledge to the reader.
Look for similar items by category
- Books > Computing & Internet > Digital Lifestyle > Online Shopping > Amazon
- Books > Computing & Internet > Programming > Languages
- Books > Computing & Internet > Programming > Languages & Tools
- Books > Computing & Internet > Programming > Software Design, Testing & Engineering > Functional Programming
- Books > Computing & Internet > Programming > Software Design, Testing & Engineering > Software Architecture