SWT/JFace in Action: GUI Design with Eclipse 3.0
M**E
Build path has changed with Eclipse 3.2
I can't comment on the book yet, as I haven't read all of it. However, it's important to get the examples running and, as things have changed in Eclipse 3.2, I thought I'd better explain how I 'eventually' managed to run them. There aren't many resources around for JFace, so I hope this helps.The SWT examples run okay but the JFace examples require the following .jar files on the build path to run correctly:./plugins/org.eclipse.swt.win32.win32.x86_3.2.0.v3232m.jar./plugins/org.eclipse.jface_3.2.0.I20060605-1400.jar./plugins/org.eclipse.jface.text_3.2.0.v20060605-1400.jar./plugins/org.eclipse.text_3.2.0.v20060605-1400.jar./plugins/org.eclipse.core.commands_3.2.0.I20060605-1400.jar./plugins/org.eclipse.equinox.common_3.2.0.v20060603.jarAlso, don't forget to add the 'swt-win32-3232.dll' to the JDK/JRE 'bin' folder, as explained in the book.
C**N
not what I expected
Just needed a book on SWT... made a poor choice. I don't know if my review will be helpful... unless you are like me, and just needed SWT... I don't use JFace much so this book was wasted on me.
J**H
Best Book Around for Learning SWT/JFace
SWT and JFace are the GUI libraries behind Eclipse. SWT uses native graphical elements, drawn and managed by whatever OS you happen to be running on, so users don't look at it and see a "Java app." It's just an app, like any other. SWT is currently limited to certain architectures - in particular, it does not support Linux or Windows on ARM as of early 2013 (though I believe this is coming). Swing covers many more architectures, but the look-and-feel support ranges from pretty good (Windows prior to version 8) to "ew," (pretty much every other operating system) depending on your target OS. If you want to target Android, they have their own libraries and neither SWT nor Swing are supported. Things to think about before you buy this book and find out it doesn't apply to your problem domain. :-)I'm a Linux user, and SWT just does a much better job matching native look-and-feel on Linux than Swing. Also, I am a heavy Eclipse user, and you must know SWT and JFace if you are writing Eclipse plugins.Okay, first let's start with what this book is not. This book is not a gentle introduction to Java. You need to be very comfortable with the language up front, including such things as threading and anonymous inner classes. This book does not cover basic GUI design principles. If you don't already know what you want, this won't help you much. This book is not a reference for the JFace or SWT APIs. That stuff is all online and searchable.So what is this book, exactly? This book covers all the high points of JFace and SWT. There are simple examples in each chapter that are small enough to encourage you to actually type them in and tinker. By the end of the book, you know enough of the fundamentals to figure out the rest for yourself.The authors have written the book to give you a brief introduction to each topic, followed by an example where they point out the highlights. They are expecting you to type in and run the examples in order to understand them, at which point you will understand their comments. If you try to only read the book without working the exercises, you are likely to come away frustrated and confused.So if you already know Java well, and you have some experience developing UIs with Swing or .NET or some other library, this is going to help you get proficient with both SWT and JFace as quickly and painlessly as possible.If you don't know Java, or this is your first time working with rich-client widget libraries, you've got a steep learning curve ahead of you, and this book is likely going to be frustrating.So why SWT and JFace, and not just SWT? If you are interested in doing anything more than the most basic UIs, JFace is a must. The widgets in SWT are superb, but very low-level. JFace makes things a lot easier most of the time, and it does not prevent you from directly accessing the low level SWT stuff when you need it. JFace is a work-saving device.To get the most out of this book, you have to read each chapter (in order - each one builds on the previous one), you have to get the code examples working (there are one or two bugs - from API changes - that have popped up since the book was released in 2004), and you have to experiment. Here, a propensity to tinker will take you far. Also, you need to have your "learning project(s)" lined up ahead of time, because this book gives short examples, not some complete project that you build over the course of the book. That's a good thing - books that develop complete projects over many chapters don't appeal to me at all. Short examples are much better, since you can skip the ones you are already familiar with.Additionally, you have to be willing to dig into JavaDoc that is relatively scattered, and occasionally go hunting for JARs in some build artifact of Eclipse. Needle-in-a-haystack type searches. There can be a lot of yak-shaving involved. Nothing new to you if you work on Java projects of moderate complexity, but daunting for beginners, and not covered terribly well in the book.The Java style in the book is dated. This was written several major versions back, when there were no generics and people still used enumerations everywhere. If you are new to Java within the last couple of years, the code can be a little hard to read at first, but the examples are generally very simple. No complex data structures or heady algorithms.If you already know Java well, and your aim is to get familiar with how to develop UIs with both JFace and SWT as intended, there is no better book out there that I know of. The book was written in 2004, I am writing this review in 2013, and it's still very relevant and useful information.
G**N
Suitable beginner introduction, after that you're on your own
I read this book and Professional Java Native Interfaces with SWT/JFace (Programmer to Programmer) at the same time. In most ways they are very similar, and most of my comments in the reviews I wrote for both are true for both books. Both give a reasonable introduction to SWT and JFace, but neither goes beyond that level. Getting an introduction from a single source that tries to organize the topic gave me a better starting point than assembling the many beginner tutorials that are available free on the Web.None of the books I have found go beyond a beginner level. By reading two books in parallel I got a better picture of the JFace event model than from either book alone. I had to learn by experiment how to use the event model and communicate data when you go beyond the tiny tutorials in the books.The sample project of this book is its weakest part. It strings together samples of the major widget classes, but gives no examples of the architecture or dynamics of a real program.I am not aware of any good resources beyond the beginner level. In my opinion both this and Professional Java Native Interfaces with SWT/JFace (Programmer to Programmer) are superior to the third easy-to-find book on JFace, The Definitive Guide to SWT and JFACE . Professional Java Native Interfaces with SWT/JFace (Programmer to Programmer)Professional Java Native Interfaces with SWT/JFace (Programmer to Programmer)The Definitive Guide to SWT and JFACE
A**R
poorly strucured and organized
"SWT/JFace in Action" proceeds to build a monolithic UI "application" consisting of a dozen or so widgets. Other than creating the widgets and putting them into an application, the book has little else to offer. Many chapters include tables of descriptions copied verbatim from the SWT/JFace Javadocs, with no additional verbage provided. There is very little coverage of event handling, or layouts. After presenting pages of vacuous descriptions like "setActionDefinitionID(String) - Sets an Action definition identifier" (p.73), each chapter concludes with the absurd statement "Now you are an expert." It would be funny if you had not just wasted $30 on the book.The silliest chapter is that of image-handling which contains a bizarre program to generate and save animated GIFs as files (why is this important to UIs?). After plodding through the process of generating images pixel-by-pixel (does anyone generate images pixel-by-pixel? doesnt everyone use methods to draw lines, arcs, elipses, & polygons?) the authors present a program to produce animated GIFs as files. The code contains strings of bytes (e.g., new byte[] {56, -67, 98, 54, -4, 2 }) with no explanation. My impression is that the author had this program on his PC and could not think of anything else to do with it but to include it in the book. The highlight is when the animated GIF is placed into the main application and the author comments that unfortunately, SWT does not provide functionality to animate it. LOL.I recommend that you read the Javadocs before you buy this book. If you need additional help, look for a reference other than this book.
A**R
Poor reference
This text may work as a simple introduction to SWT and JFace, but it is a VERY poor reference material for the minutae that is what makes SWT and JFace challenging to use. I would NOT recommend it to anyone.
Trustpilot
2 months ago
2 weeks ago