The Source for Java Technology Collaboration
User: Password:



Simon Morris

Simon Morris's Blog

Swing, and that New Car Smell

Posted by javakiddy on May 01, 2007 at 04:12 AM | Comments (24)

Car manufacturers have known for a long time that it's the little things which can make or break the sale of a vehicle. The reassuringly solid clunk of the doors as they close. The satisfyingly robust feel of the knobs, switches and handles. Even that strange hybrid plastic/fabric/wood/solvent smell which greets a potential buyer upon opening the door of a brand new car.

Of course, once the buyer is five miles down the road, the dealership a distance spec in the rear view mirror of his brand new car, the relevance of these little details begins to fade. Pretty soon that new car smell will be replaced by the odor of the family dog, snatched cups of service station coffee, and the guilty memories of a late night 'drive-thru' meal. Eventually the door will develop a slight creak, and the once virgin switches will become tainted from the imprint of a hundred fingertips. But car manufacturers know it's worth the extra effort, because at that crucial make-or-break moment when the potential owner is casting yet another uncertain eye over the glistening vehicle on the dealership forecourt (with the saleman's eyes burning into the back of his neck) it is these little irrelevant details which can make all the difference.

But what does this have to do with Swing?

As desktop operating systems mature, we are told it is increasingly hard to sell upgrades. "But all the major usability potholes were filled a couple of releases back", say the users. And so OS manufacturers must find other ways to woo customers. because no matter how hard the code monkeys work under the hood, if the bodywork looks identical many users simply walk away. (Hmm, wonder how far I can stretch the car analogy before it snaps?)

Ask any non-techie computer user to list what's new in Windows Vista and chances are the first words out of their mouths will include "transparent windows" and "3D effects". If "enhanced security" features at all, it's likely to be far down the list. Glossy 3D effects and flashy transitions are the software equivalent of that new car smell: functionally rather pointless, but a real deal-breaker when it comes to shifting units.

And what goes for desktop OS's, also goes for the applications which run on them. Bling is king, when it comes to grabbing attention.

Now, regulars of this blog may already be asking "where's this installment's obligatory pointlessly-flashy and overly-CPU-bound Swing Bling demo?" Hmm, okay, a slight detour. (*Twang*! Whoops, there goes the car analogy!) Here's a little something inspired by the legendary Commodore Amiga — surely the computer which, above any other, epitomised the notion of style over functionality (or, "you're all fur coat and no knickers", as my father used to say to the family cat.)

softshadow.png
Flash animation (courtesy of Wink)Soft shadows

[Download source]

I remember seeing the Amiga's drop shadow enhancement (or "Workbench Hack" as they were universally known) close to twenty years ago. The shadows flowed over the desktop windows flawlessly, and without any noticeable hit in performance. Even though I knew enough about the Amiga to realise the video hardware was doing most of the work (the shadow was just another bitplane) this simple effect still stands out as a powerful demonstration of just how impressive the Amiga was at that time.

I wonder how many people bought Amiga's on the strength of such bling demos, only to discover the Amiga's non-gaming software library was woefully lacking compared to its rivals? Given that the machine survived over a decade on the strength of its AV capabilities alone, I suspect quite a few. Indeed the platform's slow demise tracks its slowly eroding lead in the audio/video field, as PC graphics cards improved.

So if bling helps sell, why is opinion so divided within the desktop developer community?

Kirill Grouchnikov's Blog a few weeks back questioned whether developers really wanted to use subtle UI transition effects outside of demos. Developers probably aren't bothered — but then I doubt automobile engineers spend their days fretting about the sound of the doors or the feel of the console buttons. Even so, someone (probably some anonymous middle-management drone from marketing) makes sure they pay attention to those details.

Okay, not all bling is eye candy. There are those 'guiding' effects which help the user to navigate the user interface. Examples include soft scrolling a viewport rather than jump cutting, or flipping panels to imply a forward/back movement. But drop shadows and translucent windows don't fall into this category, and unlike the sporadic navigation effects they are permanently on screen. I suggest the following 'good practice' rules should apply:

  • Effects should not drive user interface design. The UI should never be tailored to fit some 'kewl' eye candy effect (I can think of one or two major applications which are guilty of this.)
  • Effects should be configurable. Face it, no matter how cute they look, sooner or later the user will get bored of them. The user should not have to restart the application to remove them.
  • Effects should be easy to add into an application. Developers should spend their time on the application's core functionality, not its garnish.

And it is this last point, the ease of use, where Flash scores big. Ah yes, sooner or later you just knew the F word was going to rear it ugly head.

In many ways Flash/Flex is like the Amiga: it lives in that strange no-man's land between multimedia and 'serious' (non-entertainment) software development, it has a widespread band of followers who's devotion borders on religion, and the available API support resembles Swish cheese: most of the important bases are covered but some useful bits are lacking or constrained (cryptography...?)

As it currently stands (right now, this very moment!) Flash is still predominantly, in my humble opinion, "all fur coat and no knickers" when it comes to large scale desktop/RIA software. But I suspect few would deny it shows great promise. While its usefulness outside of web service orientated applications must be questioned, like the Amiga its 'bling heavy' origins have gifted it one powerful weapon --

-- that 'new car smell' is far far sweeter for Flash/Flex apps than it has ever been for Swing!


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Some suggestions: 1. less emphasis on blings (although badly-designed Java GUIs are one of the more notable comments from java detractors) and more emphasis on creating fast, responsive Java desktop apps even with minimal (but clean) bells and whistles. 2. More emphasis on CDC apps on mobiles by desktop Swing developers, while at the same time continuing to push the desktop envelope. Hinkmond Wong demonstrated the use of F3 in a CDC devices, and with the upcoming (hopefully) JSR 249 which aims to unite CDC APIs into a comprehensive umbrella, CDC could play a big role even in enterprise apps.

    Posted by: asj2006 on May 01, 2007 at 09:26 AM

  • Very interesting Simon. Speaking of which, we listened to the feedback we got for the Extreme GUI Makeover sessions at JavaOne 05 and 06 and this year's using a "corporate" example (even if I dare say we did put in a few extreme effects... :))

    Posted by: gfx on May 01, 2007 at 09:29 AM

  • I certainly understand the perception. Although I wonder if the empathsis on bling (for blings sake) isn't mostly down to a small number of very clever and vocal developers simply showing off. The equivalent of a paralax /fairlight powerpacker boot loader with scrolly text greetz and bad backbedroom german techno. ;)

    I have been seriously frustrated by the surprising dearth of information when it comes to launching swingapps that integrate with EJBs. I've had great problems in the past meshing JWS, appserver client jars, initial contexts, jaas security settings and the like. Think I winged at Josh last time because I couldn't find a book or single tutorial that gave the subject any more than a throwaway paragraph. Spending some resources on back-to-the-basics app design & integration howtos wouldn't hurt. Although include something other than Glassfish when covering appservers please. You could argue it's up to the vendors to document their own products - but client side issues are never really given much coverage. Or they assume you'll use their own launchers & classloaders not attempt to integrate with JWS (..actually I was trying to avoid vendor lock-in).

    Even when it comes to worthy projects like the now defunct JDNC, the STILL unreleased Spring RCP and SwingX and new things like beansbinding progress have been - well ponderously slow. Although granted they're much harder than say non-rectangular windows and glowing SVG icons you have to wonder if we wouldn't (shouldn't!) have had them years ago.

    The RIA space is getting pretty crowded, if it isn't the web acting as a desktop with Ajax emulations of office tools it's the browser acting as some kind of offline app container (Firefox 3). In addition to Flex theres Apollo, Slingshot and Dekoh to name a few: http://www.techcrunch.com/2007/03/23/here-comes-competition-apollo/

    Of course the client side guys are slightly more concerned by WPF & XAML.

    - Richard

    Posted by: osbald on May 01, 2007 at 10:34 AM

  • I don't think it is so much a technology issue, but a context issue. Most users like effects etc when used right. Its just that a lot of software that is developed in corporate world, follows a process to deliver a solution at the lowest cost. What you get in a GUI often depends on the skill of the developer and the size of their bag of tricks. Most developers are under enough time constraints as it is, and unless a client asks for fancy, there is no more value to be derived by it (from the perspective of the company providing the consulting ware). I personally believe a good looking gui can really help users take ownership of a solution, but that rarely comes into play in any commercials. So there are two worlds that use java. The world of consulting ware, and the world of shrink wrap. So, like a lot of software, what is needed is a killer app. say one ont the web where other companies can see the value and go "I want that". I think you get that with a lot of Flash Apps on the web. But we don't see Java being used as much as it could in that area. So, in addition to developing the underlying tech, which will help early adaptors come up with a killer app, there also needs to be work done to help java run in areas where those features can best be used (faster loading of applets, web start is going in the right direction etc).

    Posted by: missingmatter1 on May 01, 2007 at 06:52 PM

  • osbald: The RIA space is getting pretty crowded, if it isn't the web acting as a desktop with Ajax emulations of office tools it's the browser acting as some kind of offline app container (Firefox 3). In addition to Flex theres Apollo, Slingshot and Dekoh to name a few: http://www.techcrunch.com/2007/03/23/here-comes-competition-apollo/

    Call me partisan (which I clearly am!) but should we really be humouring technologies which are essentially browser-bound/page-based/Ajax-centric (granted, augmented by bits of Flash) with a title like RIAs? Isn't the likes of Google Docs/Spreadsheets what we're trying to escape?

    Posted by: javakiddy on May 02, 2007 at 04:07 AM

  • Most often I experience "bling" as an attempt to cover up weaknesses of the application. The Amiga is indeed a great example here. The Amiga was the nucleolus of the demo scene - the people who write software which has no other purpose than to show off. There is nothing wrong with intentionally writing software which just has the function of looking and sounding good, and declaring that upfront.

    The problem is with software that is supposed to do some real work, but just acts like a demo scene showcase. Great bling, but doesn't do anything useful. I don't know how often I wished that the developer of some application would have spent less effort on the GUI and instead first of all made that @#$%^& thing work correctly.

    Posted by: twe on May 02, 2007 at 04:51 AM

  • javakiddy: Call me partisan (which I clearly am!) but should we really be humouring technologies which are essentially browser-bound/page-based/Ajax-centric with a title like RIAs

    You mean as Java developers we can thumb our noses at their technical merits and limitations? Absolutely. But I have a nagging doubt not all users can tell the difference. These online Ajax apps have been far more successful than Applets ever where. The point of some of these next gen solutions is that they're expanding their reach into traditional desktop spaces. Slingshot and Firefox 3 allow for offline use. This become useful not only for external Ajax powered sites but local firefox extensions and apps built ontop of and around Firefox -- I love my Scrapbook extension and barely notice its not a genuine desktop application. Not sure if fx3 intends developers to use the headerless xul runtime or stick with the browser.. always wondered why they don't make more of their existing and widely distributed cross-platform solution.

    Also notice Mircrosoft entering this space with Silverlight http://www.microsoft.com/silverlight/ which seems to be a targeted reuse of their existing products. Seems a shame to limit .Net & WPF to Ajax enriched pages. But maybe they're thinking the general public isn't ready for downloadable self-installing apps just quite yet? (have we really bottomed out all the security issues?). Although I suspect some of this separation is also related to future plans for payment models. It's got to be far more lucrative to charge users and ongoing subscription fee to use an online app than a one off purchase and all the piracy and ongoing update issues that entails (been there).

    * Your data may be at risk if you cannot afford to pay your subscription.

    - Richard

    Posted by: osbald on May 02, 2007 at 08:42 AM

  • Why haven’t we seen many popular Java desktop applications after 10 years of Java development? Is that because the lack of fancy looks for Java? Not, absolutely not. If it is not, then why we are spending so much time on twisting the look of Java GUI? I don’t see many MS applications with fancy GUIs either. The keys for the success of Java desktop applications are the applications deployment, native platform integration and multimedia support. With Dell starts to ship Ubuntu Linux, there is a very good chance that Java would become the number one programming language on Linux. However, those basic issues for Java desktop need to be focused on or otherwise we’ll be here talking about enhanced GUIs forever. I wish that Java applet were here today to compete with Flash and JMF were here to compete with Sliverlight.

    Posted by: jdevp2 on May 02, 2007 at 10:52 AM

  • So, a bunch of people have found ways to make swing apps look good. The main problem I still have with the "Filthy Rich Clients" crowd is that it's still very hard to write them.

    Consider a recent blog post showing some antialiased text in white over a double-gradient shiny-gray background. It looked cool, very cool. But it was about 20 lines of custom drawing code for this divider.

    So, it's possible, but we need to find ways to make it easier. The Painters framework in Swing-X is a great example of packaging effects into reusable objects. Except for a few highly-dedicated, highly-visual people, most of us don't have time for 20 lines of paintComponent().

    Posted by: mtnygard on May 02, 2007 at 11:05 AM

  • osbald: These online Ajax apps have been far more successful than Applets ever where. The point of some of these next gen solutions is that they're expanding their reach into traditional desktop spaces.

    Unfortunately I think I'm going to have to agree with you, in so far as these Web 2.0+ apps (an abuse of the term, I know) have captured the public's imagination. But, playing Devil's advocate for a moment, isn't sensible use of 'bling' one way we can differentiate Java/Swing RIA's from their lightweight HTML-bound cousins?

    Posted by: javakiddy on May 02, 2007 at 11:11 AM

  • jdevp2: I don’t see many MS applications with fancy GUIs either.

    Internet Explorer? Windows Media Player? Windows Vista? (okay, not an actual application...) :)

    I take your point though -- it can't be just about filthy rich UI's. (Fur coat.. etc...)

    Posted by: javakiddy on May 02, 2007 at 11:17 AM

  • Just for the record, i don't like the term "filthy rich client" and as such i'm officialy not the part of the "Filthy rich clients" crowd.

    Posted by: kirillcool on May 02, 2007 at 12:01 PM

  • twe; "I don't know how often I wished that the developer of some application would have spent less effort on the GUI and instead first of all made that @#$%^& thing work correctly."

    There's many people that would point out that the problem there is not the underlying technology, but having developers design user interfaces ... which unfortunately, most of the times developers are not the best persons to drive UI design (please don't throw stones at me).

    mtnygard: Great point, I think in this area a lot of great work is being done, unfortunately it's all done in bits and pieces by different projects. It'd be nice to have a more clear direction and cooperation between the projects. The only funny thing is that I think Ajax applications are anything but easy to write, as compared to traditional widget libraries like Swing.

    Posted by: augusto on May 02, 2007 at 05:32 PM

  • BTW we really need an edit function and WYSIWYG functionality in these blogs!

    Augusto

    Posted by: augusto on May 02, 2007 at 05:33 PM

  • @augusto: fixed it for you. :)

    Posted by: javakiddy on May 03, 2007 at 01:43 AM

  • Kirill, thanks for the clarification. I won't lump you in with the filthy crowd in the future.

    "Shiny clean UIs" anyone?

    augusto: watch out for a false dichotomy between "developers shouldn't design UIs" and "only interface designers should design UIs". First of all, developers and designers are both self-appointed titles. So we see vast variability in the quality of work from designers, just as we see vast variability in the quality of code produced by developers.

    Second, I've always found the best results come from a designer and a developer working together! Without the grounding that the developer provides, the designer can wander off in flights of fancy. The developer may also be able to show the designer new possibilities. On the flip side, the designer will often push the developer to go the extra mile, implementing something that won't necessarily be the easiest way, but works ten times better for the user.

    I'm showing my agile stripes here, but I absolutely know that developer/designer collaboration will trump any kind of "throw it over the wall" approach.

    Posted by: mtnygard on May 03, 2007 at 03:45 AM

  • Enough of this “Filthy rich clients” thing ! Java desktop will not go anywhere without solving the basic desktop issues, such as deployment and media support. Has Sun learnt a thing after the failure of Java desktop, Applet and JMF ? I hate to look for other solutions but it looks like that I have to start looking into .NET solution especially they are going to offer a across platform solution http://blogs.techrepublic.com.com/hiner/?p=454&tag=nl.e606

    Posted by: jdevp2 on May 03, 2007 at 05:47 AM

  • JavaKiddy: But, playing Devil's advocate for a moment, isn't sensible use of 'bling' one way we can differentiate Java/Swing RIA's from their lightweight HTML-bound cousins?,

    I have to admit to being split on the issue too. On the one hand (as I see things) client side Java accounts for a relatively small percentage of Java development. So the extreme UIs bit of a small sector would only seem to deserve an even smaller amount of resources and attention.

    On the other hand there's the age old stereotypes that Java is slow, Java's too bloated, Swing apps are big, ugly and even slower.. Users who have heard of Java for some reason seem to be against it, especially network support guys for some reason. So it's nice to have people doing the cool things, showing off and maybe turn some of this negative image around. My niggling concern here is that I don't think Kirill, Romain or Chet have ever made a Digg frontpage for all their troubles.

    - Richard

    Posted by: osbald on May 03, 2007 at 09:28 AM

  • richard - actually, i did, but not on the bling side. It was about color-blind modes in Substance, which is a very important topic on its own (and thus a little bit over 600 diggs on that one). But other than that, it's true. Not only for Swing, but for Java in general.

    Posted by: kirillcool on May 03, 2007 at 11:54 AM

  • mtnygard:

    Hey I said "many people" didn't include myself there. I'm mostly a developer, but I'm also a designer (was going to study commercial art and animation instead) so I agree with you. It's just that I just went to Cooper "Interaction Design" and their whole philosophy is based on not letting developers be part of the design process. They have a point, but go a bit too far.

    As for your agile stripes, ha, you should hear what they have to say about agile methodology ...

    Posted by: augusto on May 03, 2007 at 09:37 PM

  • jdevp2;

    Cross platform .net is a funny thing, we've heard this tune before. As for solving the issues you mentioned, Java is going open source now, so maybe other people can contribute here instead of just sun. I think some of the deployment issues are not that complicated to solve, but that shouldn't stop other areas of improvement (like fancier interfaces). It's not all or nothing here guys.

    Posted by: augusto on May 03, 2007 at 09:39 PM

  • I mean all or nothing ... EDIT button ... PLEASE!!!

    [Fixed that for you, Augusto. Yeah, we really need WYSIWYG and an edit feature for regular users on these blog comments... -javakiddy-]

    Posted by: augusto on May 03, 2007 at 09:39 PM

  • Okay, let me try to add something a little more concrete to this (very interesting) discussion. The drop shadow which appears on Mac and Vista windows -- is this a tolerable form of eye candy, or a waste of CPU? What about the more expensive drop shadow effect in the article above -- does it add a bit of extra spice to the UI, or leave a sour taste?

    I'm trying to get a sense of where the boundaries lie between eye-pleasing effects and gaudy bling.

    Posted by: javakiddy on May 04, 2007 at 04:50 AM

  • javakiddly:

    I have no problems at all with any of th eye candy in OS X, but I have had major problems with any eye candy in Windows. Is the answer here as simple as the notion that I'm somehow "anti-windows?" Of course not.

    The truth is, Windows has gotten a lot more stable. BUT, some things remain. For example, the way your machine totally freezes up if a mapped drive is responding slowly or is unavailable for a period of time. As a result, nothing repaints properly. Windows are whitewashed, the screen doesn't update. It is painful. There are lots of times in XP that the UI no longer updates properly. This behavior makes me want to turn off EVERYTHING... my desktop background, any effects, what ever. I feel like the OS needs all the help it can get sometimes, and making it render all that crap isn't helping.

    I've had my share of weird things happen in OS X too. Just recently, I had to keep relaunching Finder because it was bad about a USB drive or something. I eventually had to reboot. But the OS never got to the point where it wasn't updating the screen.

    So maybe I'm wrong here, but I just have this feeling that the eye candy in OS X never leads to poor OS performance, and perhaps it falls back gracefully on older hardware. I don't feel the same way about Windows. But maybe it is all perception. I'd probably get mad at the eye candy in a "fithy rich" app too if the app performed poorly.

    Posted by: bwy on May 04, 2007 at 02:40 PM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds