Global Consistency

The ideal thing in producing this suite of labs is to keep the style, interfaces and implementation details as similar as possible. The advantages of this include

Visual Appearance

We are using a single interface view for every lab (with minor changes in menus, etc.) This is implemented by the code in the GenericApp directory with documentation in the Docs file. The basic layout is described in this document.

Implementation Issues

Text & Help

All the help files are simple HTML files. They are prepared by the lab designer after the design has been agreed on with Raymond or Duncan, Deb etc. These should be finished by the time the programmer has completed the lab.

The Help window is the only other window allowed to appear in addition to the main window. It is described here.

Customization

Another goal of the project was to allow other instructors to customize these labs by adding their own datasets, images, text, etc. In order to do this, the labs have to read as much as possible from external files rather than have the behavior hard coded. What we are trying to do is create the engine which performs all the tasks in the labs in such a way that we can control aspects of each lab externally. &Input Files Where possible we are using property style files to specify resource-value pairs. These files consist of lines of the form
 name:   value
The class TrimmedProperties makes it a little easier to handle these. Also, we have created a class that supports a mechanism for reading properties transparently from a file or from a string. This is useful in the animation when we read the animation specification file in blocks and then the properties from within each of the blocks. Similarly, we do the same sort of thing in the Design of Experiments lab where we read the experiment description as a sequence of components each with their own properties.

What we will have at the end of is a hierarchical resource specification in which global resources are loaded that apply to all labs and then overridden by lab-specific resources. Finally, we have command line arguments.

Tooltips

We have TipButton in the GenericApp directory which implements tooltips - displaying a message when the user enters the component and leaves it there for a short while. I am going to generalize this so that it applies to any component.

The messages for the components are stored in a hashtable and read from a properties file. We have yet to work out a perfect method for unique but easy specification of these tooltips. We will probably use some mechanism similar to the X resource loose and tight bindings. This will be handled entirely in the Generic code. Options & Resources The GenericGlobals and GenericApp directories contain a collection of classes which facilitates resource and command line argument processing. Please use these throughout all applications. The LabApplet class takes care of much of this transparently also.

Printing

Each card should override the printEnabled method in the AppCard class if it supports printing its contents. Like the Undo facility below, printing is not a high priority issue but should be described in the description and skeletons and left unimplemented.

Undo Facilities

In the File menu of the generic window, there is an Undo menu item. Ideally, each card will implement a method for an Undo action or history of actions. This is complicated to do in a generic way and so would require a lot of effort which we can't afford now. However, when the labs are being designed and the skeleton being written an effort should be made to identify the semantics of the undo methods and noted in the documents. This is an important component of the labs and we will return to it when we have more of the basic material in place.

If any of these approaches appear to conflict with the aims or intentions of a lab designer, we can discuss them. However, we should try to fit things into the different approaches wherever possible so that something will produced in the time alloted.


Duncan Temple Lang<duncan@stat.Berkeley.EDU>
Last modified: Sun Apr 20 08:31:23 PDT 1997