Linked by Thom Holwerda on Sat 7th Jul 2007 19:09 UTC, submitted by flanque
Talk, Rumors, X Versus Y "Two years ago, the number of developers writing applications for the Microsoft Windows platform fell, while the opposite was true for Linux - this has now become a trend. Instead of the Web stealing away Windows Users, as people have predicted for years, it's Linux and handheld devices. According to analysts at the Evans Data Corporation research house, 64.8 percent of North American developers are writing software for Windows, down from 74 percent only a year ago. The decline in popularity of the world's most prevalent operating systems appears to coincide with the rise of Linux, as the number of developers targeting the open-source environment has gone up by three percentage points from 8.8 percent to 11.8 percent in the same year."
Thread beginning with comment 254015
To view parent comment, click here.
To read all comments associated with this story, please click here.
JeffS
Member since:
2005-07-12

"The reason that Eclipse is nice is that the project developed its own toolkit for it, called SWT. Instead of drawing its own widgets, it maps what you want to native widgets, and gets the OS to draw them. IMHO this is a better approach in general, small inconsistencies between platforms are vastly outweighed by the app not sticking out like a sore thumb. The downside of SWT is that it is really made by eclipse for eclipse, so when you try to use it for a serious project, you quickly find that if you need a feature or a bug fixed that eclipse itself doesnt need, chances are it will not get done."

Having gotten fed up with web app complexity, and not liking a lot of Flash/Ajax type stuff simply as a user, I've more and more interested in cross platform desktop development.

Of course, this has involved a lot playing around with, and coding up programs with, both Java Swing and Java SWT.

In principle, I agree with your assessment regarding SWT. It makes sense to let the OS itself do a lot of the heavy lifting on GUIs, and at the same time have the Java app look more naturally native. But the problems I've run into with SWT are:
1) As said, it's made for Eclipse, and if there is a bug that does not affect Eclipse, it probably won't get fixed on a timely manner, if at all.
2) It's pretty easy to write, compile, and run an SWT application within Eclipse itself. But try deploying a stand-alone SWT application outside of Eclipse, and it becomes a pain in the ass. You have to deploy the SWT.jar, the SWT-pi.jar, and fight with class/library paths. And the documentation for doing so completely sucks. Yes, probably the way to go is to use Eclipse RCP. That's fairly easy, because your app is based on Eclipse, and thus all the dependencies are taken care of, and builds a deployable zip. But there is a problem with Eclipse RCP:
3) Eclipse RCP brings along with it large size, and limited visual versatility. Eclipse look and feel looks nice, and blends pretty well with the native environment. But it's limited in what you can do with it, and it's look and feel, as well as how it's organized and laid out, does not fit into all desktop application needs.

Then on the other side of the fence is Swing, of course. Yes, there have been problems in the past (alien look and feel, non anti-aliased fonts, perceived sluggishness, being somewhat difficult to develop with, etc).

But those things are changing.

With Java 6 speed has been improved immensely. Plus, even though Metal/Ocean is still the default LnF, you have at your easy disposal native LnF's. For instance, the GTK LnF for Java 6 can make your app look almost exactly like a Gnome/GTK app. Then there are Swing frameworks coming out, that handle a lot of the low level dirty work, making Swing development less complex. Then there is the Matisse GUI builder that comes with NetBeans - awesome. Finally, deployment of a Java Swing app is a complete no-brainer. So long as there is a JRE, it will run, without extra work of deploying extra libraries and worrying about classpaths.

I think Sun, after years of being asleep at the desktop wheel, have finally woken up and made the Java desktop a major priority. I think going forward, Swing will be the preferred choice for Java GUI development.

Reply Parent Bookmark Score: 4