Re: Data Entry and display using Many to Many Relationalships
Re: Data Entry and display using Many to Many Relationalships
- Subject: Re: Data Entry and display using Many to Many Relationalships
- From: Bill Cheeseman <email@hidden>
- Date: Sat, 01 Oct 2005 12:44:41 -0400
- Thread-topic: Data Entry and display using Many to Many Relationalships
on 2005-10-01 8:59 AM, Clayton Leitch at email@hidden wrote:
> What interface element should I use
> to allow me to enter what groups a user belongs to, or what users
> belong to a group? Also, what interface element do I use to display
> the groups a user belongs to, or what users belong to a group?
This is a very interesting UI problem. If standard computer science has
solved this problem, I would like to hear about it.
Ideally, the solution will be easy to use with small databases, but will
scale well to large databases. Among other things, that means you can't use
pop-up menus to list every company or every person in the database.
I've been exploring this issue by developing a Core Data example application
that I intend to publish fairly soon. Here's what I do (using my example
entities, Company and Person):
1. I use separate windows. A navigation window (button bar) allows the user
to open a window for entering and viewing companies and a separate window
for entering and viewing persons. The company and person windows are
formatted almost identically, but this isn't a requirement. Using the
company window as an example:
2. The company window is a standard master-detail view, with a table to
select companies from a scrolling list of all companies in the database, and
a bunch of text fields to display detailed information about the selected
company. At the moment I don't allow multiple selection, but when I do, I
expect the detail view to show only details that are identical as among all
selected companies. I also expect to allow setting identical values in all
of the selected companies at once. So far, this is very standard Core Data
stuff, but:
3. At the bottom of the detail view, there is a special area for management
of linked persons. I'm trying different combinations of buttons and pop-down
command menus in this area to produce a user-friendly control center. I've
implemented these functions:
a. A "link to person" command links the company to whatever person is
currently selected in the person window. It opens the person window if it
isn't already open. Using a pop-up menu for the "link to person" command
allows me to include the name of the selected person in the menu item so you
can see from the menu itself which person will get linked. I haven't decided
how to word this menu item when multiple persons are selected, but it might
just say "link to selected persons".
b. An "open person window" command opens the person window without
linking anything -- this duplicates the functionality of the "show person
window" button in the navigation window, but it's convenient to have it in
the linked person management area of the company window, too. This lets you
select a person if the right person isn't already selected for the "link to
person" command. After you've selected a person in the person window, you
can use the "link to company" menu item in the person window, instead of
moving back to the companies window to use its "link to person" command,
since these are many-to-many relationships and linking one way automatically
also links the other way.
c. A "find and link to person" command. I haven't implemented this yet,
but I'm tempted because I have found that switching to the person window to
select the person I want to link to is a little awkward. This command would
let you type in a search term. The text field used for this purpose would
presumably implement autocompletion to make it especially easy to use. (I do
currently implement a standard search field at the top of the person window,
so when I switch to it I am not limited to scrolling in the table to find
the person to select.)
d. A "show linked persons" command. This opens the person window,
programmatically enters a "persons linked to company 'XXX'" entry into the
person window's search field, and filters the person window table so it
shows only the persons that are linked to the currently-selected company.
e. A "preferred person" command (this should really be a "select person"
command). This is implemented as a pop-up menu, which is populated by all of
the linked persons' names. I use a pop-up menu on the theory that the total
number of linked persons will always be relatively small; another kind of UI
element would be required, such as a search field, if this assumption is
invalid. Choosing a preferred person has the effect of populating a set of
"person" text fields showing detailed information about the preferred person
within the linked persons area of the company window. Thus, you do not have
to open the person window to enter and view detail information about any
linked person. You only have to open the person window when you want to link
to another person. However, consideration of screen real estate would
probably force a significant application to limit the number of fields shown
in the linked persons management area, so switching to the persons window
would be required for full access to all of the linked person's fields.
f. an "unlink from person" command. Self-explanatory. Currently, my
implementation only unlinks the person currently selected in the person
window, so it requires switching windows again. Soon, I will change this so
that it either unlinks the current preferred person or presents the same
pop-up menu of linked persons and allows you to unlink the one you select.
I find that all this works well and conveniently, and it feels intuitive to
me (but, of course, I am now way too close to it to know for sure). As
noted, the only awkwardness I find is in having to switch to the person
window to select a person to link. But I think I'm satisfied that, except
for a search option, that is the best I can do for a large database.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden