Thursday, July 16, 2009

Of GUI conventions and cross platform portability

Well, this post I guess belongsin the "and stuff" category of my blogg. I am reading Joel Spolsky's book "Joel on Software" now, which is a collectioon of Joels writings on different software things. I will post a review in due time, but for now, I wanted to touch on another subject that this book brought up, and which is related to my new version of MyQuery that is soon coming up, which is this: Who controls the conventions of the GUI of an application? There are several possible answers to that question, such as:
  • The application - I.e. the application code determines what keys are used for cut, paste, open file, the order of standard buttons (Open,Close) the look of the windows and other things that the application does.
  • The GUI - I.e. Windows / KDE / Gnome / OSX or whatever GUI framework you use determines the standard functions as listed above. As for any applicatioon specific functions, that is still left to someone else.
  • The user - I.e. the user can determine this. Note that this can be done in several ways, i.e. the user can control the Application or the GUI Framework itself.
Usually, there is some mix of this in most applications. Some keys and conventions are left to the GUI Framework (Cut / Paste / Open File shortcut keys, Dialog button ordering etc), some are hardcoded in the application, and some are configurable by the user. The question is how we determine the mix of these things.

To put it differently. If I have a cross platform application, do I follow the conventions of the different platforms I run on, so it looks like a Windows app on Windows, a Mac app on OSX etc? Or do I create an application that works more or less the same, independent of platform? The latter path is choosen by, for example, Adobe, to a large extent. This means that Photoshop works like Photoshop, not like any other Windows app, assuming we run on Windows. For someone using Photoshop day in and day out, this is great, the application works and looks the same, independent of platform. For someone like myself, who use it now and then, this is a major pain. Things don't work as they do in any other Windows app I know, PS Windows don't have a "close" button on the top right corner (at least not last time I looked) and key combinations that I am used to using doesn't work.

Which path to choose? I don't really know, I am just raising the issue. And while I was thinking about it, I decided to have the new version of the MyQuery GUI much more flexible, with many more functions controllable by the user. This is how I would like PS to work: Have it configurable and provide useful defaults: Work like PS, Work like Windows, Work like KDE etc. To an extent, this is what I am doing in MyQuery now. Now, I don't have all the time in the world, but i have relaized one thing: Having configurable function keys for menu options is real easy in Windows. These are called "Accellerators" in Windows, and I have built a simple framework to support configuration them with easy. I can't beleive more applicatoons don't allow this.

Also, I have included proper exception dumps in MyQuery. This is still on a basic level, but I got the idea on this from Spolskys book. And not to get ahead of myself here, but, I do like some aspects of the book, I do get ideas from it, but it is terribly opinionated (hey, who isn't!) and there are quite a lot of things I do not agree with.

And not even Microsoft got this right. Ctrl-C / Ctrl-V to cut and paste is the Windows convention, right? Try that in aDOS Window in Windows...

/Karlsson
Back to finishing up MyQuery, and spending some vacation time in the Sun

2 comments:

Garth said...

I think Adobe can do it because their GUIs are generally exemplary. Everyone else that attempts cross-platform GUIs seems to screw it up.

As distressing as it is to developers and to those who hope for a cross-platform world, the major platforms have disctinct stylistic and functional differences in their GUIs. These differences just can't be finessed -- nonconformant apps always stick out like a sore thumb.

I'm a bit mystified by some of the lame cross-platform GUIs displayed by, for example, Java apps. If you don't think GUI design is worth doing well, why are you bothering to develop a GUI at all?

Karlsson said...

Garth!

In general, I think you are right, and I also agree with your take on the cross-platform GUIs. And they have the same problem which route to take: One look-and-feel, the look-and-fell of the platform in question, or a unique look-and-fell. The latter seems the path taken by Java mostly, which is fine, except that I don't think they did a good job of it. Which makes SWT the best of the bunch, in my mind.
Where I don't agree with you is Adobe GUIs. I don't like them at all, but this is probably because I am less of a Mac than Windows user. But I don't know, except that I don't like it (which is why I rather stich with PSP than PSE for graphics editing).

/Karlsson