next up previous
Next: Discussion of Tools Up: Tool Support of Previous: Examples of Customizations

Tool Support of the Customization Process

  The customization process is supported by so-called hook reports. A hook report is a browser that displays information about hooks at some selected level of detail.

There are two ways the user of the personal database facility can approach the information about available hooks in the system: Via static or dynamic hook reports.

Figure 2: An example of a static hook report.

The static hook report relevant for our sample application is shown in figure 2. Each entry (each line in the presentation of the report) shows information about a single hook. The left column of the report shows all the hooks in the database group. The middle column shows the procedures attached to the hooks. As can be seen, the hooks add-database-entry and get-email-hook have already been attached. (The latter is attached to more than one function). The right column shows the hook combinators in effect.

Via static hook reports (as well as the dynamic hook reports), it is possible to browse into the detailed documentation of the individual hooks. The documentation presented in this way is defined by the hook-documentation clauses (see section 5.4). Using the static hook report in our customization example, it is possible to get knowledge about all the hooks in the database group, but it is up to the user to find out which of the hooks are relevant for the customizations we have in mind.

Figure 3: An example of a dynamic hook report.

The alternative way to get information about hooks is through a dynamic hook report. A dynamic hook report displays information about hooks when they are encountered during the execution of a program. If we assume that dynamic hook reporting is active for the database group, then the requests of inserting the address of someone results in entry number 1 and number 2 in the report shown in figure 3. Asking for a phone number results in entry numbers 3 and 4. Thus, a dynamic hook report makes it easy to relate specific interactions to all potential open points encountered during these interactions.

Static hook reports are initiated from a more general report, which we call a hook classification report. An example of such a report is shown in figure 4. The report shows all the known groups of hooks (cf. section 5.5) together with a so-called filter-condition. If a programmer is interested in obtaining detailed, dynamic information about hooks in a specific group, he or she should turn on the filter condition for that group. In figure 4 the hooks belonging to the groups database and emacsgif will be reported dynamically. A hook classification report is created on explicit request from the user.

Figure 4: An example of a hook classification report.

Besides the browser functionality of hook reports, the reports also offer a flexible interface for experimental attaching of hooks. Instead of using the programmatic hook interface, as defined in sections 5.2 and 5.3, a terse command interface, based on direct manipulation of the entries in the reports is provided on top of the hook reports.

Let us continue our concrete example from the state of the dynamic hook report in figure 3. After reading the hook documentation, the user finds out that the hook get-address-hook is relevant for the first of the customizations. By just typing the single letter ``a'' (for attach) on the entry for this hook, the user will be prompted for a name of the function to be attached to the hook. If the function doesn't exist, the tool will offer to define a template of it, with the correct parameter profile.gif Now it is straightforward to try out the effect of the attachment, simply by interacting with the database again. It is also easy via the command interface to get rid of an attachment.

next up previous
Next: Discussion of Tools Up: Tool Support of Previous: Examples of Customizations

Kurt Noermark
Wed Mar 6 09:44:24 MET 1996