aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes SWT books, JFace criticism Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "SWT books, JFace criticism" Watch "SWT books, JFace criticism" New topic
Author

SWT books, JFace criticism

jay vas
Ranch Hand

Joined: Aug 30, 2005
Posts: 407
hi -

Im a bioinformatics app developer at Uconn. I have 2 swt 2 questions/thoughts...

1) on books :
I got the "swt/jface in action" book - its very poor. There are high level explanations and low level examples, but very little integrative examples...And not a it doesnt have a single sophisticated application whose GUI requires refreshing or is dynamically generated from model components.

Anyone know of a more practical book on SWT ? Im looking for complete examples of the MVC framework - I.

2) on JFace :

Also - I still havent found a reason why JFace makes life so much easier...How is writing an "Action" class any easier than writing an "ActionListener" class as you normally would in swt or swing ? Can somebody enlighten me on this one ?

thanks j
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

1) on books :
I got the "swt/jface in action" book - its very poor. There are high level explanations and low level examples, but very little integrative examples...And not a it doesnt have a single sophisticated application whose GUI requires refreshing or is dynamically generated from model components.


And you probably won't find such a book that is specificly about SWT/JFace. However, I own both SWT/JFace in Action and I also own The Definitive Guide to SWT and JFace and I like it quite a bit better. But it still doesn't really show you what you are looking for. Swing books have the same problem for the most part.

2) on JFace :

Also - I still havent found a reason why JFace makes life so much easier...How is writing an "Action" class any easier than writing an "ActionListener" class as you normally would in swt or swing ? Can somebody enlighten me on this one ?


Well, this kind of goes along with your first question. JFace is very MVC in design.

How is writing an "Action" class any easier than writing an "ActionListener" class as you normally would in swt or swing ?

Technically, you should use Action classes in Swing as well. What an Action class does is encapsulate your "action" in a reusable object. So instead of writing your actions in the actionPerformed method of an ActionListener for every button, textfield, menuitem, etc, you do it once in an Action class and just reuse that object when you need it. I guess maybe you didn't read my reply to your comments here ?
[ September 08, 2005: Message edited by: Gregg Bolinger ]

GenRocket - Experts at Building Test Data
Jo Valid
Greenhorn

Joined: Sep 29, 2005
Posts: 2
I totally agree with Jay. I think both books lack important aspects of swt/jface programming.

Does anyone know of a good tutorial or book that is concerned with the actual design and/or best practices of swt/jface gui applications? I mean things like:

- how to best implement the MVC pattern with swt/jface?
- how to use the observer pattern (with respect to changes in the model! jface does provide classes for this i.e. IPropertyChangeListener)?
- how to keep the gui responsive (how to use threading to do this)?

Considering the latter aspect: I just stumbled over D'Anjou et al. "The Java Developer's Guide to Eclipse" 2nd Ed. where they describe how to use syncExec and asyncExec. Unfortunately developing standalone swt/jface apps is not the focus of this book.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SWT books, JFace criticism