| By Joe Winchester | Article Rating: |
|
| March 18, 2007 10:30 AM EDT | Reads: |
40,859 |
JDJ: Apart from the previous two, what's the single question you get most tired of being asked about SWT?
Steve: Nothing really stands out. Explaining design
decisions like style bits, constructors, and threading can become
tiresome. But really, people can't know the answers to these questions.
If they have never done any operating system programming and have a
Java-centric view of the world, then asking these sorts of questions is
quite natural.
How about, "Why did you do SWT? Are you trying to fracture the community?" The answer is "Anything but."
Silenio: Why doesn't SWT use finalization? I'm sick of that one.
JDJ: There was a JavaLobby story recently about some folks who'd managed to get the SWT API to work with Swing classes, and even had screenshots of Eclipse running under Swing. Does this kind of effort a) amaze, b) frighten, or c) bore you?
Steve: None of the above. I think this is really cool. One of the challenges of SWT is developing an API that can run on all sorts of different platforms. If you consider Swing as just another platform, these guys ported to it. I think our position with respect to other technologies is pretty consistent. I don't expect that to change. Interestingly, this port reaffirms many of the API design decisions we've made.
Carolyn: a)
JDJ: The Linux folks seem to complain about print support for SWT. Is this an issue and something being worked on?
Steve: Fixed > 20060717.
Carolyn: Printing support was added to GTK+ with the release of GTK+ 2.10 in July. We added GTK printing to SWT practically the next day, and it went into Eclipse 3.3M1. The main point is that we were waiting on this from GTK.
JDJ: What's the most exciting thing going on in SWT at the moment, both within the committers and development team, and also the larger community with its usage of SWT?
Steve: For me, it's Vista.
Silenio: WPF port, animation API, theme drawing API, Windows port for 64-bit ...
Kevin: The SWT community is fun to work with because they're a very dedicated bunch who really want to contribute. There are an amazing number of bug reports filed and the reporters are always willing to work with the team to provide more information, testing, and the feedback that we need to make SWT better. It takes a significant commitment to become a committer. For example, I have been an Eclipse committer on another project for over three years but despite that, I still need to earn my commit rights fixing problems and learning the SWT code base.
Grant: Not 64-bit XP. Mozilla everywhere?
JDJ: What's in the pipeline for SWT in the future?
Steve: It's too early to tell. We're looking at lots of things. Right now, it's a very interesting time for user interface technologies. Never has this space been so fragmented. We can't even agree on the computer language let alone the platform. On Windows, it's C/C++ for Win32 and C# or VB for .NET. On the Mac, C for Carbon and Objective-C for Cocoa. Linux systems support GTK+ and Qt. Many of the older workstations are still running X/Motif. Then there are the browsers. Do you use XML or AJAX to program them? Flash is a pretty cool technology. What about PHP? If you choose AJAX, what widget library do you use? You can use Dojo, but there's also GWT, J2S, and a dozen more.
One thing is certain: rather than fight technology, we will embrace it and continue to help programmers build and ship products. That's the interesting part.
JDJ: What do you think of efforts to have a declarative way of describing an SWT GUI in something like XML?
Steve: If the world goes declarative, then we will too. One thing I know for sure though, you will always need an API to manipulate widgets.
JDJ: If you had to do SWT all over again, what would you do differently with the benefit of hindsight?
Steve: Not much really. We made a few API mistakes, arguments in the wrong order and that sort of thing, but nothing major stands out. A really good indicator of this is that almost nothing in the toolkit is deprecated. In this world of bloatware and complexity, I'm really proud of what we did in terms of getting the API right and keeping the size of the toolkit down. For example, the class hierarchies for graphics, widgets, the browser, printing, and drag and drop all fit on one slide without using a tiny font. It's amazing considering the functionality that's packed in there.
JDJ: Why are there so few interfaces in SWT? Classes like org.eclipse.swt.widgets.Layout might be a good candidate for an interface rather than an AbstractClass.
Silenio: Interfaces have a big drawback: they can never change. Once an interface ships, nothing can change, otherwise it breaks binary and source compatibility. I believe API always evolves and abstract classes make this evolution easier, without leaving a trail of dead code behind (Interface1, Interface2, etc.).
Carolyn: You have to get an interface exactly right the first time, because you can't change it without breaking binary compatibility. That's why you get silly names like "ISomething2", or, for example, "IDispatchEx"...
JDJ: Why is LayoutData typed to java.lang.Object, whereas a marker interface might help to do things like validate at compile time that the argument was actually valid? Instead, things like Assert and casts have to be done within layouts, which presumably is more expensive for performance and also a less clear API than using typed arguments. For example, instead of layoutData as an attribute on Control, you could have had Layout.setLayoutData(Control,Object) that was overloaded on each implementation, e.g., GridLayout.setLayoutData(Control,GridData).
Silenio: There should be a common class (no interface, see above) for the layout data objects. This would allow some sharing of some common properties. On the other hand, having declared it as an Object does not necessarily mean bad performance, since usually the layout algorithm performs caching and the validation of the objects only happens when the cache is flushed.
JDJ: Likewise for arrays as arguments. Things like setSelection(String[]) or Widget[] getItems() instead of using lists and collections.
Carolyn: I like Arrays
Silenio: SWT runs on JDK 1.1 and collections were only introduced in JDK 1.2.
Published March 18, 2007 Reads 40,859
Copyright © 2007 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Joe Winchester
Joe Winchester, Editor-in-Chief of Java Developer's Journal, was formerly JDJ's longtime Desktop Technologies Editor and is a software developer working on development tools for IBM in Hursley, UK.
![]() |
Vince Marco 03/11/07 05:43:41 PM EDT | |||
> Carolyn: You have to get an interface exactly right the first time, Exactly how is this different with classes? API is an exact contract, whether it is done through interface or class (abstract or concrete). As a developer I can either depend upon the API or I can't. API management is difficult, period. And yet it must be done or we have to throw out everything for a whole new framework every so often. The difference is that with interfaces I can separate out dependence on how to do something (the API) from the implemented behavior. Good discussion, BTW. |
||||
- Kindle 2 vs Nook
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- Confessions of a Ulitzer Addict
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- It's the Java vs. C++ Shootout Revisited!
- Cloud Computing Can Revitalize Your Career as Software Developer
- IBM Could "Reinvent" Java: Mills
- Oracle & Cloud Computing: Exclusive Q&A with SVP Richard Sarwal
- A Brief History of Cloud Computing
- Kindle 2 vs Nook
- Cloud CEOs, CTOs & SVPs to Speak at 4th International Cloud Computing Expo
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- The Difference Between Web Hosting and Cloud Computing
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- My Thoughts on Ulitzer
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- A Cup of AJAX? Nay, Just Regular Java Please
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- The i-Technology Right Stuff
- JavaServer Faces (JSF) vs Struts
- Rich Internet Applications with Adobe Flex 2 and Java
- Java vs C++ "Shootout" Revisited
- Bean-Managed Persistence Using a Proxy List
- Reporting Made Easy with JasperReports and Hibernate
- Creating a Pet Store Application with JavaServer Faces, Spring, and Hibernate
- What's New in Eclipse?
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- i-Technology Predictions for 2007: Where's It All Headed?







































