Saturday, July 22, 2006

Can we learn anything new from Swing?

I have done something that all developers should be cautious of; I found one technology I really liked and settled without tracking the competition. The technology I am referring to is SWT! A few years ago I stumbled upon SWT and I haven't looked back since. SWT was faster than Swing, felt better than Swing and of course, my Java apps finally stopped looking like "Java Apps". For years I was happy, I told everyone how much better SWT was than Swing, and I wondered why the whole world hadn't switched over.

Recently I started listening to a few of the Java Posse's Podcasts. The Podcast consists of 4 guys talking about New and Noteworthy things regarding Java. They don't seem to have much experience with Eclipse, although their general Java knowledge seems pretty good. N.B: They are definitely Swing Guys! After listening to their Podcast about Swing Labs I thought I should check it out. It looks like Swing has come a long way in the past 4 years, and the Swing developers credit some of the success to the arrival of SWT. They have claimed that SWT gave them a kick in the rear. They even claim in the SWT vs. Swing battle, Swing has won... I wouldn't go that far!

I don't understand why anyone would want something that almost looks like "Real Widgets!". That is like saying I like my floor because it "Almost looks like Hardwood!" The quote I enjoy most is, "On Windows, Swing looks like windows, and on Linux it looks like Linux..." Looks like Linux!!! What on earth does that mean? Including myself, we have 4 heavy Linux users in our lab, and we all have different Themes, Colours, and Fonts... What does a Linux Button look like?

But when it comes to Emulated (Non-Native) Widgets, Swing may have stumbled upon something. Swing Labs are a group of developers who are writing "Sexy" Swing apps to show the power of Swing. As they develop these applications, new widgets are componentized and they eventually make their way back into the SDK. I was wondering if something like this would be useful for SWT. I am aware of the Nebula project; however, the widgets here still seem to have a business focus. Also, this project is focused on the creation of widgets, not demonstrating their uses through new “toys”. I am primarily talking about applications and widgets for the average home user.

Don't get me wrong, I think native widgets are very important and most applications should be using these. However, for the next Funky I.M. application, Map Viewer, Media Player, Image Browser, Video Game, etc... Fancy looking, Drop Shadowy, Web 2.0ish User Interfaces can have a huge impact. If you don't believe me, just look at the number of skins people have created for WinAMP / XMMS. I personally don't like the look of iTunes, but many people do. It is this type of customization which is very difficult in SWT and it may be something to consider as we move forward.

Does anyone have any thoughts (without getting into the age old SWT vs. Swing battle).


AlBlue said...

Is it just me, or do 'sexy' apps like WinAmp actually make you want to barf? Most of the time, they're hideous from a user interface perspective, often with subtle graphics for doing mundane operations.

Don't get me wrong, I enjoy a good graphical adventure game ala Kings Quest, but having an application hide its functionality behind a collection of random graphics (especially those that appear/disappear as you move your mouse over to them) is the antithesis of good design.

In fact, the only good use of skinnability is the look-and-feel for Swing Napkin look and feel.

However, I do think that there's a good point; having widgets are one thing, and having a good demonstrator app that shows how those widgets can be used is a good thing. I would say that having a business-focussed set of apps is probably the right way to go; have an application that is targetted towards a particular type of user (e.g. reporting and drill-down) and you'll start to see the benefit of where to use those widgets.

Chris Gross said...

The Nebula project is designed to be very open and we hope to have all kinds of widgets end up in Nebula. The Grid widget may not be so 'sexy' but tables/grids have been a pain for many RCP developers for a some time. Both Grid (KTable and others too) and the changes in the core SWT Table have changed that.

You can expect more exciting widgets to come. Widgets that don't have native peers. I do also have plans to provide some more appealing sample applications in the future.

Stay tuned!