Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Decent GUI design

by gregor42 (Parson)
on Apr 16, 2001 at 18:58 UTC ( [id://72831]=perlmeditation: print w/replies, xml ) Need Help??

Recently I've been going through a sort of 'Tk Phase' where I've been creating GUI interfaces for dozens of little scripts that I've made. I suppose this happens to people when they really 'discover' the Tk module.

One thing that occurred to me while doing this, is that both (Perl)Tk and Java sort of suffer from an 'overly visual' orientation in the ideaological(SP?) layout of the design API's.

What I mean by this is that it seems to be a lot of work binding Hot Key's to menus, buttons, etc.. I would think that in Tk, for example, it would be a simple option to create a keystroke equivalent of a button event.

Initially reading Learning Perl/Tk by Nancy Walsh was confusing because I thought that the -underline option's description implied that the key was bound to the widget, where in fact, you apparently have to add a binding to the Keyboard event(s). (Something I groked about 150 pages later)

My thoughts on this subject boiled down to this:

It is solely up to the programmer to create a 'Decent GUI design' wherein a user does not necessarily need to use a mouse to navigate/operate it.

I was once told & learned to agree with later, that 'You will always go faster using the keyboard than you will with a mouse.' (Albiet for experienced users...)



Wait! This isn't a Parachute, this is a Backpack!

Edit: chipmunk 2001-04-16

Replies are listed 'Best First'.
Re: Decent GUI desgin
by Masem (Monsignor) on Apr 16, 2001 at 19:40 UTC
    Most modern gui toolkits, include Java's and Tk's and Gtk's and Qt's, are based around the fact as being modular as possible; it should allow the programmer as many 'hooks' into the GUI process as possible to modify behavior if so desired. To this extent, the process by which one does the combined tasks of "assigning a hot key to a menu option" and "underlining the menu text to indicate a hot key" are considered separate; I can envision numerous reasons to do this, one being for internationalization. The drawback to all this is that you can easily lose a coherent gui framework as you get more authors writing different programs with that toolkit; one might not use unlined characters in the menu, one might avoid hot keys, and so both take advantage of the different hooks available to get the desired behavior, both which are atypical, but allowable by the toolkit.

    I remember before Jobs retook Apple that there was the Human Interface Guidelines*; I know Sun was recently pushed by the community to develop similar guidelines for Java programs. In both cases (Mac OS developement and Java toolkits), the GUI framework allowed for deviations from HIGs, but in the case of Apple, nearly 90% of the programs released tried to adhere to the HIG. I would love to see something similar for X or the like, but because we are dealing with 3 strongly different tooklits, I doubt that will happen soon.

    * Apple still has HIGs, but the interface of QT4 and other features in MacOS X, are strong pulls away from these.


    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
Re: Decent GUI desgin
by Sprad (Hermit) on Apr 16, 2001 at 19:58 UTC
    I was once told & learned to agree with later, that 'You will always go faster using the keyboard than you will with a mouse.' (Albiet for experienced users...)

    Not in every case. Imagine using something like Photoshop with nothing but keyboard commands. I've got a graphic designer friend who's spent probably a third of his life on Photoshop, and he swears by a hybrid technique -- one hand on the mouse for drawing, the other on the keyboard for switching tools and doing menu command shortcuts.

    GUIs are great, keyboard interfaces are great, but sometimes one's just better suited for the task than the other.

    'course, I'm still waiting for thought-controlled computers...

    ---
    I'm too sexy for my .sig.

(ichimunki) Re: Decent GUI design
by ichimunki (Priest) on Apr 16, 2001 at 20:03 UTC
    There are, in my mind, two ideals reasons to use a GUI-- you have an application that simply requires a mouse or pointing device to be workable (like a drawing program) or your information is best expressed visually (for instance, an image viewer or graphing program).

    In the first case, why would you want to get rid of the mousing? In fact, you'd want to make it even easier to use just the mouse (the GIMP is a good examples of this, with its right-click on the image for a powerful menu feature). In the second case, you may very well want to make it as keyboard-friendly as possible by including a command-line replacement text or entry widget or two (a disturbingly good example of this is the mini-buffer in emacs).

    Of course, it's almost never this simple, is it? Somewhere in the middle is a happy medium. One of the things I like about Tk is the way you can use the arrow keys and tab to navigate menus and buttons, that way you're not trying to bind everything in sight, but can still bind some important starting places, like menus but not the menu items themselves.
      ... why would you want to get rid of the mousing? In fact, you'd want to make it even easier to use just the mouse (the GIMP is a good examples of this, with its right-click on the image for a powerful menu feature)...

      I never thought of getting rid of the mouse. I'm NOT anti-GUI. The point of the post was that I was making GUI's for everything. I was merely pointing out that hot-keys are usually dealt with as an afterthought when IMHO they should be tied to the widgets more tightly.

      Why do you need to define a sub for the button & another sub for they keystroke. Why not bind the keystroke to the widget...?

      And the answer was given by Masem-sama who pointed out that there might be an Internationalization issue.

      And I grant that yes, Visually Oriented software is GUI driven by nature. However, most of the commercial graphic artists that I know use Photoshop & use the hot keys like mad to make their work go faster. As a programmer I want to accomidate these people. I hate Windoze but I use it at work so I learned all of the hot keys. I have a few Macs at home (amongst other things) & sometimes I get frustrated when I have to use the mouse to do something, when otherwise I'm on a roll.

      I think the point I was making is that as programmers it's our responsibility to provide "More Than One Way To Do It". As in: practicing what we preach in these hallowed halls.



      Wait! This isn't a Parachute, this is a Backpack!
Re: Decent GUI design
by seeker (Curate) on Apr 17, 2001 at 14:48 UTC
    Like you, I struggled with Nancy Walsh's book, but, like you, after creating a couple of applications things began to come clearer. I've written GUIs using X and FoxPro and for me the process is the same, initially confusing, but gets easier the more you do it.

    What I would like to see is something along the likes of a Perl/TK cookbook like the Perl Cookbook. Learning by doing has always worked for me, but I learn better by seeing how others do it. (Is anybody from O'Reilly reading this? I hope, I hope, I hope)

Re: Decent GUI design
by pmas (Hermit) on Jun 12, 2001 at 22:43 UTC
    If God intended us to use mouse instead of keyboard, our hands will be terminated by USB inteface instead of fingers... ;)

    Decent GUI design is not straightforward. Why?

    Because we have different expectations from audience.

    Pictures (icons) versus text

    There are two kinds of memory :
    (1) researching memory (when you are learning something first time), and
    (2) recalling memory (when you know it, but need little reminder, little association).

    Researching memory works better using words, text. Recalling one works better with graphics.

    Micro$oft spent millions researching this issue, so they have icons (to remind), but also ToolTips (yellow text bubble), when mouse hoovers above button and you are obviously not sure what button does.

    Keyboard versus mouse

    Mouse is better in 'research phase', when you do not know exactly what you want and how to accomplish this, or to point on something. Later, when you know ways and shortcuts, many people prefer to switch to keyboard, because there are mu more possible combinations 'on the surface', so we do not need to select in multiple levels of menu. Yet many never do keyboard shortcuts, will be stuck to grab mouse i.e. when they want to move focus from one field to another, and will never try TAB.

    Many of you probably know the itching when somebody is switching between mouse and keyboard all the time, even for task easily made by keyboard only? Seconds fly by... Maybe I am not patient enough... : )

    Many also know frustration when i.e. in Nescape navigator you cannot go BACK to previous page using backspace as in IE, and you need to grab mouse...

    There is rule of thumb that if user user same program more than 10-15 hours a week, it is worth to learn shortcuts. If uses less than that, s/he will probably forget them.

    I remember my embarrasment when I returned to programming after couple of months pause, when I struggled to do on conscious level many things what I did before without mind effort, you know you think about it, and fingers just do it.

    Same story with driving a car - You are good driver when you switch turn signal on and off without thinking about it.

    Also, some people are harder to understand even simple concepts.

    I have colleague of mine, using Win/PC not too often, and it took me about 10 years to teach her that Ctrl+C will copy 'something', and Ctrl+V will paste it. In these 10 years, I explained it about once a month for different programs, until it sinked in... : )

    From other point of view, I know about a case when accountant rejected one system and preferred another (ours :), and one of the reasons was that our system was capable to entering data solely by keyboard, but competition relied on mouse too often, slowig down plain data entering. We were lucky they noticed it. Usually this kind of feedback you get only after some time using system.

    Summary:
    IMHO, many profesional users prefer keyboard, if feasible (not for pointing into graphics, of course). Many of them like possibility to build and adjust shortcuts.

    I know I do. My favorite editor MutiEdit is so customizable you may find new features after years of heavy usage.

    BTW, how many of you know that you can open combo-box (pull-down list, HTML SELECT via Alt-DownArrow, or even F4? Try it i.e. in MS Word - font pull-down.

    (Sorry if two kinds of memory above are called and translated differently in english - I read about this concept not in English. If somebody knows established translation, please let me know, I'll be glad to update.)

    pmas

    To make errors is human. But to make million errors per second, you need a computer.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://72831]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-25 14:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found