Slashdot Log In
Complex GUI Architecture Discussion?
Posted by
Cliff
on Wed Oct 16, 2002 02:12 PM
from the nuts-and-bolts-behind-the-desktop dept.
from the nuts-and-bolts-behind-the-desktop dept.
XNuke asks: "I have been searching for intelligent discussion (on dead trees or otherwise) of the issues involved in designing very complex GUIs. Things on the level of TecPlot, AutoCad, 3DS, etc, where there may be very many different views of the same data and there are many degrees of freedom for the user. I am not interested in 'where to put the buttons', but rather the nuts and bolts of making the 'Well Designed UI' work. I guess I am looking for a sort of 'Design Patterns applied to a big deskptop application' sort of discussion. It is no problem to find discussions of Model-View-Controller concepts at the component level, but at the application level there seems to be nothing. Too often the architectural level discussions encompass non-interactive, server side design issues and not the extremely chaotic problems a client side application with many degrees of freedom has. Short of wading through megabytes of source code for KWord et. al., does anyone know of any digested information? There is obviously no 'One Solution' to this, but there must be something out there."
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
My Favorite GUI (Score:3, Funny)
Re:My Favorite GUI (Score:3, Insightful)
Re:My Favorite GUI (Score:3, Funny)
<form>
<input type="submit" value="C:\>">
<input type="text" size=60 name="command">
</form>
For UI Reference (Score:3, Informative)
Map it out (Score:3, Funny)
These work well with the visualization needs that you and your group have as well for the upcoming project; search the Web for the Kohonen learning algorithm and apply a simple summation over each term in the respective vector, remembering to square each quantity as well.
This way, the topological view of your program's user interface will be well-refined, easy to navigate, and of a very high resolution (for CRTs, at least -- LCD monitors refresh too quickly and you may get relics [blurs] from high-oscillating models).
intelligent discussion (Score:3, Funny)
So you wrote into Slashdot expecting that? Please!
Carnegie Mellon's Human Comuter Interaction... (Score:4, Informative)
They seem to have a bunch of projects relating to what you are doing here [cmu.edu]
Good luck,
--Alex
Re:Carnegie Mellon's Human Comuter Interaction... (Score:3, Interesting)
Observers and Adapters (Score:5, Informative)
Adapters allow standard UI controls to embed domain objects without either layer knowing about the other. For example, say you want a tree to list Employee objects. The tree does not understand what an Employee is. However, you can make a tree that takes a TreeAdapter object that knows how to provde its name, subitems, handles renaming and drag-n-drop, etc. You can then make an EmployeeAdapter subclass of TreeAdapter that wraps an Employee and knows how to make a tree node out of it. If the EmployeeAdapter observes the Employee, it can handle changes to the Employee object.
Learn from other successful software GUIs (Score:5, Insightful)
For UI logic design... (Score:5, Informative)
Don't think of it as a GUI (Score:5, Insightful)
/. search (Score:4, Funny)
Too lazy to do a search yourself?
Just have a thousand geeks search for you!
Re:/. search (Score:3, Insightful)
Welcome to assholeforum.slashdot.com
The guy's already said he's looked everywhere for something similar, now he's come to the 'enlightened' forums of slashdot where the most helpful post some people can muster is RTFM. Since it isn't clear that there even IS a FM, maybe you can cut someone a little slack, offer a helpful suggestion or shut the fsck up.
Technological eletism helps no one. If you think what he's looking for can be found on Google... find it and prove us all wrong. If it isn't exactly what he's looking for, you can go crawl back under your hole where we will all leave you to peacefully revel in your astounding ability to program in assembly, while your festering glee grows with your ever-expanding intellect.
GUIs are at times more elaborate than back end (Score:5, Interesting)
For redundancy or performance reasons you want to have the same business rules executed on the GUI as well as verified on the server. The work required to set a trigger on the database is not the same for representing that on the GUI to the user. The amount of detail that goes on interactively with the user could hardly be managed directly by a server. Because of these I agree that more patterns besides the model-view-controler are needed.
Currently I am on a project where a 'web' form takes 20 days to build but the store procedures that manage the data take 2 or 3 days.
Re:GUIs are at times more elaborate than back end (Score:5, Insightful)
This is typical of UI issues in general, and I wish to heck more non-technical managers would realize this. The amount of coding and hard thinking that goes into making an interface reliable, idiot-proof, and easy to use can be truly astounding, and is often the largest part of implementing an interactive application. A ratio of 85% UI code to 15% non-UI code isn't at all unusual. Nor should this be surprising: interfacing with a database using a set of well-defined logical rules is almost easy compared to interfacing with the unreliable sack of semi-random chemical reactions sitting at the keyboard. Even when they're not clueless and stupid, people are among the most complex real-world phenomena any programmer will ever deal with.
Parent
Re:GUIs are at times more elaborate than back end (Score:4, Insightful)
I attribute this to the huge difference between batch processing and running an event loop. Programming languages are very well suited to "do this, then do that" style batch programs. But it is much more difficult to handle interactivity ("on click, do this, on keypress, do that") since you have to keep track of dependencies between internal data structures and the external interface.
e.g. say you have a rule that when MyApp::toolbar_visible == true then the toolbar must be shown. But most programming languages don't allow this kind of declarative specification. Instead, you have to track down every line of code that modifies MyApp::toolbar_visible, and tack on extra code to hide/show the toolbar depending on its new value... Or, if you have a slider control that is supposed to reflect the value of some variable. You again have to track down every point where that variable can be modified, and insert code to update the scrollbar.
MVC helps here, but it's still annyoing - instead of the simple "MyApp::toolbar_visible = true;" you end up writing something like "MyApp::toolbar_visible = true; MyApp::notify_toolbar_change();" Ideally you should only need the "= true" part, and the language runtime should figure out that the toolbar needs to be shown.
I've seen some attempts to use declarative specifications for interface elements, like NeXT's interface builder and TCL's "watched" variables. But none of these are really mainstream. (I don't have much Visual Basic experience - is that declarative?)
Parent
Re:GUIs are at times more elaborate than back end (Score:4, Insightful)
Some languages (such as C#, VB.NET, or Python) even provide built-in support for accessors -- this uses the same syntax as a regular field access, so it is transparent to the user.
For example, in C#, you could write this as part of MyApp:
private bool mToolbarVisible = false;
public bool ToolbarVisible
{
get { return mToolbarVisible; }
set {
mToolbarVisible = value;
NotifyToolbarChange ();
}
}
and then later:
MyApp app =
app.ToolbarVisible = true;
and it would call notify automatically.
Parent
MVC is the pattern (Score:3, Interesting)
Other common approaches are essentially Use Case driven and can be very directed (see Installshield). Or more generalized (see phpAdmin,
Also people are VERY particular about the kind of interaction they like for a given set of tasks. When I design a UI I use MVC (or more usually M VC) and map out my UCs very carefully and in a fair amount of detail. Then I do prototyping to prove the design/UCs (often the users cannot give a good description of what they want until they are sitting down and using something).
The Humane Interface (Score:5, Insightful)
I found it on amazon where one reader stated that "Once you read this book you will know why you have the programs you hate." He is right... I absolutly loath vi now (not that emacs is that much better of going after Raskin;-).
Anything by Alan Cooper (Score:4, Offtopic)
He would call what you are talking about "interaction design" not "interface design". The Inmates book makes a good case for how the two are different and why interaction design is a better approach.
The revenge of the clippy (Score:4, Interesting)
it must be something that we ate.
Re:The revenge of the clippy (Score:4, Interesting)
GUIs try to present the subset of options that are meaningful to the computer in a consistant manner.
For instance if option B is only available if option A has been selected a GUI can help enforce that constraint. A shell type command line can't help the user make acceptable choices (generally).
The graphical framework helps the user organize his internal thought process to work in harmony with the interface. That the interface pushes the user to think a certain way is part of why interface preference is very personal.
Parent
Pick a rule and stick with it. (Score:5, Interesting)
This was the primary concern we had when I was working on Vegas Video [sonicfoundry.com]. At first, we treated audio and video differently, thinking that different media types would require different interfaces, but we quickly realized that most actions for one media type had a corresponding action for the other (i.e. Fade out). When a coherent interface element did not exist, we extended the user interface for the given media type. We never allowed an interface element to exhibit different behaviors for different media types.
Of course, Vegas Video is not the end-all of user interfaces, but I learned a lot about simplicity and consistence in interface design.
It's the difference between a complex application and a powerful one.
Re:Pick a rule and stick with it. (Score:4, Interesting)
Jef Raskin (who wrote the Humane Interface) referred to this as using "modes". He strongly recommends that modes should be *avoided*. A lot of software developers build UIs that *wrongly* expose the internal representations of the data used by the application.
In the Vegas Video example obviously sound and video are quite different types of data. To users, however, both are just media that they want to string together in some dramatic order. Users don't want to worry about whether they're in Audio Mode or Video Mode.
I saw a few posts above that mentioned Raskin's The Humane Interface, and I strongly recommend the book. Some of the book can get a bit dry (particularly the usability testing methodology) but the higher level conceps are very sound.
Parent
One Word (Score:5, Insightful)
UI Resources list (Score:5, Informative)
Unidraw has what you're looking for (Score:5, Informative)
Not an HCI question... (Score:5, Insightful)
I think part of the reason such discussions seem to be lacking out there is that each GUI toolkit has its own way of conceiving of event-based GUI interaction, and separating the presentation of a GUI element from the logic that handles it. Thus there is no real standard set of design patterns for GUI implementation (there are tons of sites I found using Google on GUI "Design Patterns" which are basically just HCI best practices for communicating certain kinds of concepts). For example, Qt uses the signal-slot mechanism. wxWindows uses EVT_ macros to associate an event with an action method. These encourage different ways of structuring GUI code.
I am not saying it's impossible to come up with a set of rules of thumb for general GUI development and implementation in the same way that general design patterns for OO development exist to solve certain kinds of problems that are commonly encountered, but I'm doubtful they would be as useful as you would think.
Some references here (Score:5, Informative)
(If you have access to a university library, you can find those proceedings there as well)
Architecture -- not interaction design (Score:5, Insightful)
You mention MVC. This is a very useful abstraction, but you're right in saying that it doesn't address the larger question of application architecture. One kind of global abstraction that seems to help for large interfaces is some kind of messaging system. For example, you can use a global queue of update events (sent by Models when things change) which all interested Views can lsiten to, and react accordingly.
Some real problems come when you want views to react to changes so some other view (but NOT the underlying model data). e.g. changing from 2d to 3d display, you might want various menus to appear, disappear, or have entires change/gray-out. This breaks down the MVC abstraction to varying degrees.
At the end of it all, I also haven't seen much in the literature on architectures for large GUI apps. I think this is because very few of them are really ever produced. Most apps you see are, at the base of it all, fairly simple, and require only one or two views with pretty straightforward control architecture.
Re:Architecture -- not interaction design (Score:5, Interesting)
Parent
My thoughts (Score:5, Insightful)
Everyone has a use for a word processor but not everyone has a use for one this programs but when you do you need it bad. When you design the architecture and the UI you need to keep flexibility in mind. This is not so much for the user but for you so you can met the needs of a SPECIFIC customer. It is my experience that customers really want the vertical market software they buy to aid their current way of doing things, not to change what they are doing to meet the needs of the software.
A specific industry has a lot of common needs but there is enough variation that if you don't design flexibility in mind it will drive you crazy with tech support and lose buyers who can't get the software to do what they exactly want.
There two things you need to consider for such programs. The architecture and the UI.
I following many of the standard advice on designing UIs but here are a couple that I try to keep in my mind.
1) Keep the focus of the screen in the center of the screen. Try to add widgets to the top AND bottom to keep the screen's focus in the center. For example there was a version of my software where the sheet of metal was bumped down so that it's center was a lot further down then the center of the screen. This is bad. The next version I redesigned that screen so that the widgets were equally distributed between the top and bottom. This way the user's eyes when they move to the monitor has the sheet exactly where it is needed.
2) Work-flow, you should provide either a means via keyboard or mouse to accomplish common tasks. You can do one, the other, or both. However what you shouldn't do is mix the two. If the task has keyboard components you should try to enable the user to complete the task without moving from the keyboard. The same for tasks involve the mouse. Tasks that involve a lot of moving from mouse to keyboard leave user unhappy.
Try to have a keyboard way and mouse way to do all tasks. Sometimes it isn't possible but if it is do it.
3)Softkeys, toolbars are nice it is my experience that users respond better to text then icons. User like big fat buttons on the screen. What I come up with the idea of softkeys. If you look across the top of your keyboard it probably has 12 function key arranged in groups of 4. What I do is have eight buttons on the top or bottom of my screen split into two groups of four. The first four correspond to F1 to F4 and the second four to F5 to F8. I use F9 to F12 for special actions. F9 is generally used for "flipping" the softkeys. This give me room for 16 commands per softkey group.
On the more complicated screen I have multiple groups of softkeys. For example Zoom, Cut, Edit Path, Sketch, Rotate, etc. Each having up to 16 commands. I also provide a way to switch between the groups.
The advantage of this that the user can see exactly what they can do in front of them. They can use the mouse to click on the command or use the corresponding function keys. While I do use some toolbar buttons most of commands are accessed through the softkeys.
4) Make important tasks very easily accessible. Use single letter or buttons to tie into the task. For example Edit Cutting Parameter is a command often used in my software. So I tie it into not only a softkey but a toolbar button accessible no matter what softkey group you are in.
Architecture.
First get Design Patterns and Refactoring Software, regardless of what langauge you use they will be very useful.
The goal of Architecture is to have flexibility to meet customer needs without introducing a lot of bugs into your software because you changed something. I am not sure what to call what I use but it builds heavily on Design Patterns.
Data Structures
Application Structure
UI Interface
Commands/Installable Libraries
UI Implementation
Graphic Framework
Data Structures (Sheets, parts, etc)
Application Structure (I use an idiom of Jobs comprised of sheets with parts, with a separate Shop Standard that is refered too by all Jobs, and a list of installable libraries ).
UI Interface (nothing but Interfaces)
Commands (these use the command pattern to implement )
Installable Libraries (like reports, part creation, file types, etc)
UI Implementation (implements the UI interfaces with methods accessing commands and libraries).
Graphic Framework (Delphi, Qt, KDE, Gnome, VB Forms, etc).
The reason for UI Interface -> Commands -> UI Implementation is so that commands that just manipulate the UI (switch screens) can be written. The actual implementaion is last because the implementation needs to know what commands are available to assign to various screens and widgets.
I hope this helps
GOF Design Patterns (Score:3, Informative)
Then The GOF Design Patterns [hillside.net] may be what you're looking for. The case study used for most of the pattern illustrations is that of designing a word processor -- which is no simple feat. A lot of these can be extended to any type of a UI architecture.
Fitts's law (Score:3, Informative)
Scripting is a popular choice (Score:3, Interesting)
Good Question - Lots of Answers (Score:3, Informative)
I appreciate the original authors appeal. There aren't any good books on complex GUI design and implementation, unlike for instance the UNIX Operating system. In the Demon Book ( The Design and Implementation of the 4.3 BSD UNIX Operating System, Karels et al) they delve into all the ugly detail of the design, the history, the mistakes and the many attempts to fix the mistakes (particularily in the memory manager). The strengths of the Linux kernel derive significantly from this book and other similar tomes (there is one for System V whose name escapes me at the moment).
However in UI design if you've got a map and compass you can consider yourself lucky, but you still have no idea of the terrain or the topography. Throw the concept of MVC at a novice user interface designer is about as useful as saying "demand paged memory" to a budding OS designer. It just doesn't reveal the true challenges of the problem.
In order to get your head around that you need to consider what the users conceptual model is e.g. how are they going to approach the problem you software plans to solve. Both AutoCAD and Word have a head start in this regard as they could draw on the experience of the users who lived in those domains (technical drawing, and writing and editing) prior to the entrance of those programs. (AutoCAD also has Ivan Sutherland to thank for his ground breaking work in Computer Graphics, this is the man that invented rubber banding as a line drawing concept). Visicalc on the other hand had to invent a concept from scratch in order to provide the desired utility.
Once you understand the basic model you need to understand that the model changes as you move from user to user and also changes as users try to achieve different things with the software. It also grows with their experience. The stuff you need to get started as a novice Word user you almost never use once you are proficient with the program which is why all us dyed in the wool slashdotters constantly bemoan the Word animated paper clip. However the big bad world of first time users love that stuff.
Therefore you program needs to grow with your users, starting simply and revealing itself slowly as their knowledge grows. At its most complex it must allow skilled users to perform their jobs effectively while still remaining true to the unifying paradigm defined by its conceptual model.
The best research in this area can usually be found in the ACM conference proceedings particularily those associated with User Interface design. You should also check out Mark Lintons work on "Interviews" (try http://www.berlin-consortium.org/docs/papers/toolk it.pdf for starters)
I have to admit tho' its a hole in the technical literature in general...
User Interface Group @ PARC (Score:3, Interesting)
GUI architectures (Score:5, Insightful)
Emacs is the right programming architecture for GUIs. The Emacs command set and visual appearence are, obviously, not that great for many users -- but the programming architecture is right.
By being interactively extensible, emacs makes it easy to fine tune an interface while you play with it.
By being lisp based and by having many fine abstractions, emacs let's you do a lot with very little code.
The emacs architecture provides some very fine bits and pieces for achieving excellent accessability features.
By being interactive and self-documenting, Emacs is good at helping people teach themselves to program.
View-tree toolkits, such as underlie Gnome and KDE are inflexible dogs that leaded to bloated yet feature-anemic tools. You know what they're good for? They're good if you have a command-and-control army of drone programmers who can write reams and reams of code. That's why Microsoft apps will remain far more featureful than their free competition until that competition switches to an architecture that works for a society of free individuals.
Yes, it's true: the way you structure your programs has political implications. It defines jobs. It defines the power of managers and project managers. It establishes the degrees of freedom your users have to extend or customize their tools.
Re:Don't forget Rule Number One (Score:3, Funny)
Assign points over time (which can be done since modern computers have sequential ability, rather than just a set of combinational logic gates).
Why not attempt (or adapt) the following measure? --
User Ability: {Charisma + Determination + Discipline + Raw Intelligence + Logic + Wisdom)/[ln(Pi*timeSinceInitialInstall)]}
Develop a few simple tests and embed them into some questions (perhaps an inital registration script that loads upon first run) to find each value, and then run the numbers based on the above equation.
Or just have a grad student do it for you!
Re:HCI (Score:3, Insightful)
Actually, Google's interface is one of the best examples of design and functionality going.Check out their cleanly laid out News area.Beats CNN, etc.
That's got to have had something to do with its' universal appeal
Re:Mac gets it right. (Score:4, Funny)
Parent
Re:Mac gets it right. (Score:4, Informative)
If you would read the actual Apple HIG, they say that apps which are meant to replace a real-world item/function (such as Calculator, iCal, iTunes) should be built with the brushed metal look. All other apps should use the default, untextured look. Just thinking over the apps included in OS X, it seems to me like they follow this guideline fairly closely.
Parent
Re:Mac gets it right. (Score:3, Insightful)
If you would read the actual Apple HIG, they say that apps which are meant to replace a real-world item/function (such as Calculator, iCal, iTunes) should be built with the brushed metal look.
They break this numerous places: in fact, virtually everywhere.
By the definition above, *everything* should be brushed metal. Word processor replaces pencil/typewriter. Spreadsheet replaces graph paper. Sherlock replaces phonebook/dictionary. Photoshop replaces sissors/paste/darkroom.
If you try and tighten it down to obvious objects like iTunes replacing a radio, then why is iChat brushed metal? Why is iMovie brushed metal and Final Cut Pro Aqua? They do exactly the same thing!
This is one area where Apple is just out to lunch. The HI folks had nothing to do with brushed metal: it's clearly a Steve "That's cool: go with it" decision.
The Question is NOT about Human Factors (Score:5, Informative)
The poster is asking about software archecture and design patterns. Think of it this way: Okay I want to code a new IDE, but I want to code it well. So what's the best way to get the UI to talk to the code that actually compiles the source code. Or another example: a database management suite. How do I best seperate the UI code from the code that actually talks to the database. And once I have them in seperate modules, how do I get them to talk to each other? This is a question about computer software design, not UI design (although, UI design is very important). The advantage to thinking this way though, is that when software is coded this way, people who do understand "Human Factors" and proper User Interface Guidelines can tweek and adjust the UI without modifying the underlying code that performs the logic of the application.
The Model-View-Controller design pattern mentioned is a good start, although I'm not sure how well it scales to larger, more complex programs. (I'd love to hear from someone who has experience in this.) And of course the "Design Patterns" book by the 'Gang of Four' has other designs that might be more appropriate. Also, most complex applications will incorporate multiple design patterns.
This is a very interesting question, one I've had before and I haven't found any good resources yet either. Perhaps the best resource would be to actually go through the code of a complex program like Mozilla, OpenOffice, or the like. Fun? Easy? Probably not, but you'd learn a lot.
Parent
Re:The Question is NOT about Human Factors (Score:3, Insightful)
Actually, in this question lies the answer. On a sheet of paper, draw a line separating the paper into two halves. In one half write "UI Module" and in the other half write "Database Interface Module".
These two modules can be written, so that the UI module uses only the public interfaces of the database module. This is the high level design of the application.
Designing each module well is an entirely different challenge, since the quality of the database module's interfaces determine how resilient the application is to changing requirements.
I guess the lesson here is that the really high-level design is trivial, but the design of each module is very hard and should be done by someone experienced in such things. Reading good books on the subject is only the beginning.
Re:The Question is NOT about Human Factors (Score:5, Insightful)
On a sheet of paper, draw a line separating the paper into two halves. In one half write "UI Module" and in the other half write "Database Interface Module".
Actually, this is considered bad form in an OO design. The UI "Module" (classes) should only talk to the Model classes, while the Model classes may or may not talk directly to database classes. They may be mapped to database tabels thru an indirection layer.
There is some great discussion of this at Martin Fowlers website [martinfowler.com].
Parent
Re:Human Factors (Score:3, Interesting)
I wish the Slashdot coders had read that book. I got my butt jumped because I used ['s to encapsulate a bold tag instead of the typical HTML greater-than signs. According to some, my being used to VBulletin syntax (used by several forums I vist) is a sign of how truely stupid I am. I think it's a sign of how unfriendly Slashdot's interface can be.
It's not a poke at Slashdot, but rather an observation that book helped me make about UI. Slashdot's just a handy example. Now, when I write web pages, I have a better perspective of the things I should do to prevent mistakes like the bracket example from being irrecoverable.
Anybody who's interested in design should read that book, it helps you understand why humans make the mistakes they do and what you can do to accommodate them. Hint: It's not because we're all too stupid to read a manual.
Re:Human Factors (Score:5, Insightful)
He doesn't want fluffy designer stuff. He wants to implement a complex U/I with multiple views on the same data. Designing the interface is trivial. Implementing it is the problem. His question has no obvious answer other than: "just jump in; you'll get it right on the 2nd or 3rd try like the rest of us."
BTW, MVC is crap. It falls down for much smaller problems than what you're looking at.
Parent
Re:GUI is Part of an APP but not the whole thing. (Score:3, Informative)