|
|
|
This chapter offers guidelines to help you develop a graphical user interface (GUI):
Section | Description |
---|---|
Briefly describes the process for developing a GUI-based application. (If you've developed GUIs in the past, you may want to go directly to Section 2.1.3, "Planning the user interface". |
|
Addresses visual considerations for creating forms. The section begins with a review of basic Form Builder terminology, discusses the importance of object libraries as a means of enforcing standards, and presents guidelines for employing forms objects in your GUI. |
|
Helps you understand how to control the placement of report objects and where page breaks occur. |
|
Presents some visual considerations for graphical representations of your data. |
Even more important than understanding the process for developing an effective GUI is understanding the people who will use it. In fact, your success is directly related to how well you understand your users--the tasks they perform, the order in which they perform them, their surroundings, and their expectations.
If you're like many application developers, this idea may require a profound shift of focus. Applications typically evolve from the inside out: from the datasource itself, to the code, and finally to the GUI. If you are committed to developing an effective GUI, you must reverse this process: first, interview your users; next, design a user interface that supports their specific tasks; and finally, create the underlying code base that makes it all work.
No set of prepackaged standards or guidelines can serve as a substitute for developing an accurate understanding of your users' needs. This chapter can help you develop that understanding, as well as assist you in creating an interface uniquely tailored to your particular group of users.
As shown in the Figure 2-2, the process for developing a GUI consists of four major stages:
The rest of this section offers guidelines for completing each of these stages:
Note: This chapter is not intended to treat the subject of GUI development exhaustively. If you require more detail on how to proceed in a given stage, you may want to visit your local library or computer bookstore. In particular, Jeffrey Rubin's "Handbook of Usability Testing" is an excellent source of information on defining user requirements and gathering user feedback.
In the first stage of GUI development, you determine what the user needs and expects from your application. While it may be tempting to skip this stage and move right to the design phase, it's risky to do so. Without a clear understanding of the users themselves and the tasks they must perform, it is virtually impossible to create an effective GUI.
To define user requirements:
In the second stage, you plan and document how you will implement a user interface that meets the users' needs. This involves:
A set of consistent development standards is crucial to the success of any development effort. By developing and enforcing standards pertaining to layout, use, and behavior of various GUI elements, you can ensure that even disparate parts of the application have a common look and feel. Both Forms Developer and Reports Developer offer several mechanisms to assist you in developing a consistent set of standards.
If you intend to deploy your application in more than one environment, it's important to understand how various GUI elements are rendered on each platform and which elements are restricted altogether. For example, due to formatting constraints between platforms, interactive buttons that you create for Windows may shrink and become less readable when displayed on Solaris. Chapter 5, "Designing Portable Applications", helps you understand platform-specific constraints and provides tips and guidelines for working around them. It also provides considerations for character mode, which restricts the UI in numerous ways.
Prototypes are an extremely effective means for ensuring usability in your application. The most effective prototypes follow an iterative development model, beginning with a storyboard and ending with a fully functional application. The process breaks down as follows:
Here is an example of three panels from a storyboard for an ordering application:
Only when you have devoted sufficient time to developing your conceptual model--that is, when you fully understand your users and the tasks they perform and have designed smoothly flowing dialogs in support of those tasks--only then are you ready to begin building your user interface. This chapter contains three sections to help you choose your user interface elements carefully:
When you have developed a working prototype, either on paper or with Forms Developer or Reports Developer, return to the users you interviewed in the first phase and let them experiment with it. To gather user feedback effectively:
Remember: only the actual user of your application is qualified to comment if the UI is appropriate.
After testing the prototype on users and gathering their feedback, return to the build stage, modify the user interface accordingly, then test your changes again. Continue this cycle until the interface meets the objectives you outlined in the requirement definition phase.
This section explains how to build an effective GUI using Form Builder.
Note: The information in this section assumes a Eurocentric viewpoint. (If you are developing for a non-Western audience, be sensitive to the cultural background of the users. If practical, have your design reviewed by several members of your target audience.)
Before addressing specific considerations for forms, it may be helpful to briefly introduce some basic forms concepts. (Experienced Form Builder users should go to Section 2.2.2, "Guidelines for building forms".) For more details on these and other related forms topics, see the Form Builder online help and/or the Forms Developer Quick Tour.
When you build an application with Form Builder, you work with individual application components called modules. There are four types of modules in Form Builder:
Module Type | Description |
---|---|
Form module |
A collection of objects and code routines. Some of the objects you can define in a form module include windows, text items (fields), check boxes, buttons, alerts, lists of values, and blocks of PL/SQL code called triggers. |
Menu module |
A collection of menus (a main menu object and any number of submenu objects) and menu item commands. |
PL/SQL Library module |
A collection of user-named procedures, functions, and packages that can be called from other modules in the application. |
Object Library module |
A collection of objects that can be used to develop applications. See Table 2-1, "Standards mechanisms" for more information. |
This chapter does not address the use of PL/SQL library modules. For information on this topic, refer to the Form Builder online help.
Simply put, a form (or form module) is an application that provides access to information stored in a datasource. When you look at a form, you see interface items such as check boxes, radio groups, and so on, which enables the user to interact with the datasource. These interface items belong to a container called a block. In Figure 2-4, the fields Customer ID, First name, Title, and so on all belong to the same block.
There are two types of blocks: a data block, which serves as a link between the datasource and the user, and a control block, which is not associated with a datasource. Each data block can enable the user to view and access data from one table in the datasource. Blocks can be single-record blocks, which means that they show one row of data at a time, or multi-record blocks, which enable users to see many rows of data at once. All of the fields in Figure 2-4 are in single-record blocks.
A region is a rectangle or line that separates a logical grouping of fields from others in the block. In Figure 2-4, the rectangle that separates the Customer Information fields from the Accounts icons is a region.
A frame is a pre-defined way of arranging certain items in a block. For example, the block shown in Figure 2-4 was arranged by a frame that established its margins and offsets, the distance between the items and prompts, and so on.
A window is the container for all visual objects that make up a Form Builder application. A single form can include any number of windows; all but the simplest of forms have several windows associated with them. Several types of windows are available:
Here is an example of a typical Form Builder window:
Like most Windows 95 Form Builder windows, this one contains:
A canvas is the background object upon which interface items appear. There are four types of canvases:
Each window may display one or more canvases. You can also conditionally display a canvas in a window, depending on whether certain conditions are met.
The following sections offer specific recommendations for building an effective GUI with Form Builder:
Perhaps the most important means of standardization available to you as a form developer is the object library. An object library is a set of objects and standards that you create; each object or standard can determine the appearance and layout of an entire frame, window, or region. When housed in an object library, these objects become available to all the developers on your project or site, thus ensuring that even developers working at different locations can produce an application--or different modules within the same application--with a common look and feel. Through the use of subclassing, each developer can ensure that changes made to the objects in the object library are propagated throughout all applications that use them.
A good strategy for using object libraries is to create a separate one for each logical grouping of standards. For example, you may want to have one object library for corporate standards that you make available company-wide, and another tailored for the specific needs of your project.
To help you get started building your own object libraries, Form Builder provides two samples:
Before you create your object library, it's a good idea to test the contents of the Standard or Oracle Application Object Libraries to see what works well and what you need to modify.
If you use the Standard Object Library, be sure to subclass all the attributes under the VAGs tab to the Visual Attributes node in your form. Many of the standards are based upon these visual attributes and will not display correctly if the visual attributes are not applied. By subclassing (rather than copying) the visual attributes, you ensure that you always have access to the latest definitions.
If you know that you will be using a particular set of visual attribute groups in all or most of your forms, create a template form that already contains the visual attribute groups subclassed from the standard object library. Then you can name this template when prompted by the Layout Wizard.
For more information on the object libraries, see the help topics "Standard Object Library" and "Oracle Application Object Library" under "Reusable Components" in the Forms Developer Demos online help.
Here are some general guidelines for building forms:
Example: All users should be enabled simple freedoms, like the ability to interrupt an application and resume it later on. But enabling users the ability to completely rearrange a company-issued invoice may not be wise, since it affords the user power to disregard company standards.
The extent to which users should have control is also determined by the user's experience level. If you are developing an application for both experienced and inexperienced users, consider providing a wizard to provide step-by-step assistance for those who want it, along with manual alternatives.
Color | Implies... |
---|---|
Blue |
Cool |
Black |
Profit (financial) |
Green |
Go, OK, Danger (for chemists) |
Red |
Hot, Stop, Danger, Loss (financial) |
Yellow |
Warning, Attention |
The following table presents recommendations for creating canvases.
The following table presents recommendations for creating windows.
Attribute | Recommendations |
---|---|
General |
|
Title |
|
Position |
|
Scrollbar |
|
Toolbar |
|
While the STD_DIALOG_WINDOW_MODELESS object in the Standard Object Library addresses all issues pertaining to positioning, closing, resizing, and placement, you still have to choose your own title. When doing so:
Examples: Assignments (OR1) - [John Doe]
Purchase Order Lines (ABC) - [New]
The following table presents recommendations for creating regions
The following table should help you decide when to choose one form item over another. It also presents some guidelines that you can use if you decide to modify an object or standard in the Standard Object Library. The items are presented in alphabetical order.
Messages are shown either in the window console area or in popup windows called alerts. How you display messages depends upon their type and whether a reply is required by the user. Here are some suggestions:
If possible, error messages should include:
Here are some examples of bad and good message text:
When writing message text, try to adhere to these guidelines:
This section discusses using two types of online help:
Tooltips Also known as popup hints and microhelp. Displayed when the user moves the mouse over an item on the screen.Online Help Contains context-sensitive help and hypertext links that enable users to jump to related topics.
Each item has a property called Tooltip and another called Tooltip Visual Attribute Group. In the Property Palette's Tooltip property field, enter the text you want to display in the pop-up. To ensure consistency across your application, apply the STD_TOOLTIP visual attribute from the Standard Object Library. If you don't apply a visual attribute, the tooltip uses a platform-specific default.
Form Builder provides a default menu for every form. The default menu includes commands for all basic database operations, including querying, inserting, and deleting. If your application has specific requirements not met by the default menu you can quickly create a custom menu. (See "Creating a menu" in the Form Builder online help for instructions.) While building a menu, keep the following ideas in mind:
The first steps in using Report Builder to design an effective report are the same as those for designing an effective form or display. Before reading the rest of this section, it's a good idea to read Section 2.1.2, "Defining user requirements", if you haven't already.
Here are a few questions to help you determine the user requirements for your report:
Before addressing specific considerations for reports, it may be helpful to briefly introduce some basic reports concepts. (Experienced users of Report Builder should skip this section.) For more details on these and other related reports topics, see the Report Builder online help and/or the Report Builder section of the Reports Developer Quick Tour.
When you build a report, you work with two application components:
This section does not address the use of PL/SQL libraries. For information on this topic, refer to the Report Builder online help.
For some reports, you will use the Report Wizard (to choose a report type, define a data model, and a layout for the data) and the Report Editor's Live Previewer (to fine-tune the report). For other reports, you will use other views of the Report Editor:
Because this chapter discusses how to create visually effective applications, the remainder of this section focuses on using the templates, objects, and settings found in the Layout Model view.
Perhaps the most important means of standardization available to you as a report developer is the template. A template is a collection of boilerplate objects, and layout and report settings that determine the appearance of an entire report. Several templates are shipped with Report Builder, and you can create your own. By creating corporate or group templates and making them available to your entire development team, you can ensure a common look and feel. For instructions on how to create a template, see the Report Builder online help.
The Layout view of the Report Editor may contain the following objects:
With the exception of anchors, layout objects may have format triggers, such as PL/SQL blocks that are invoked each time the object is activated.
When designing a report, remember that the size of the entire report and the size of many of its individual objects may vary, which can affect pagination in a printed report. Consider a report based on this query:
select ename, sal from emp where sal > 2000
The size of this report and its objects is based on several factors:
Instances of the same object may also vary in size. For example, suppose you have a VARCHAR2 column in the database called COMMENTS. For one record, COMMENTS might contain two sentences. For another, it might contain 10 sentences. The size of the field in your layout that corresponds to the COMMENTS column must then be able to accommodate values of different length. In addition, objects around that field may have to be "pushed" or "pulled" to avoid being overwritten or leaving large gaps in the report.
Fortunately, Report Builder provides a variety of mechanisms in the Layout View of the Report Editor that enable you to control how objects are sized and positioned. These mechanisms are described in the following sections:
Anchors determine how objects in a report layout relate to one another. When two objects are anchored together, one object is considered the parent and the other the child. By defining parent-child relationships between objects, anchors establish a hierarchy for the objects in a report. Based on this hierarchy of objects, Report Builder decides how objects should be printed in relation to each other, whether it should attempt to keep the two objects on the same page, and how objects should be pushed or pulled depending on the size of surrounding objects.
Anchors can be created in one of two ways:
The Print Object On property determines the frequency with which an object appears in a report. The Base Printing On property specifies the object on which to base the Print Object On property.
For example, if you specify a Print Object On of All Pages and a Base Printing On of Anchoring Object, the object is triggered to print on every logical page on which its anchoring object (parent object) appears. Objects created by the Report Wizard have these properties set for them. In most cases, the values that Report Builder chooses are the best ones for the object. The only time you should need to set these properties yourself is when you want to override the default value set by Report Builder.
In applying the Print Object On property, Report Builder considers the first page of an object to be the first logical page on which some part of the object is printed. Likewise, the last page is considered to be the last logical page on which some part of the object is printed. For example, if you specify a Print Object On of First Page and a Base Printing On of Enclosing Object, the object will be triggered to print on the first logical page on which its enclosing object appears.
Notes:
For more information, refer to the Report Builder online help, index entries: Print Object On and Base Printing On.
The Horizontal and Vertical Elasticity properties determine how the horizontal and vertical sizes of the object may change at runtime to accommodate the objects or data within it:
Objects created by the Report Wizard have these properties set for them. In most cases, the values that Report Builder chooses are the best ones for the object. The only time you should need to set these properties yourself is when you want to override the default value set by Report Builder.
Different elasticity settings can produce unexpected results in the output. For example, if an object with variable horizontal elasticity contracts, all objects to the right are moved to the left, since these objects are implicitly anchored to the variable object.
For more information, refer to the Report Builder online help, index entries: Horizontal Elasticity and Vertical Elasticity.
Unlike word processing documents, reports and their objects can vary in size and position at runtime. As a result, page breaks in a report can be difficult to predict.
For more information, refer to the Report Builder online help, index entries: Page Break Before and Page Break After.
Use the Page Protect property to try to keep the entire object and its contents on the same logical page. If the contents of the object cannot fit, they are moved to the next logical page. Note that this does not necessarily mean that all the objects below the object with Page Protect set will move to the next page. If one of the objects below can fit on the page, it might print above the object which has Page Protect set.
For more information, refer to the Report Builder online help, index entry: Page Protect.
Use the Keep with Anchoring Object property to keep an object and the object to which it is anchored on the same logical page. If the object, its anchoring object, or both cannot fit on the logical page, they are moved to the next logical page.
If you set Keep with Anchoring Object for a repeating frame, the first instance of the repeating frame must be able to fit on the same page as its anchoring object. Otherwise, the Keep With Anchoring Object condition is not satisfied. If you set Keep With Anchoring Object to Yes for any layout object other than a repeating frame, the object must be able to format entirely on the same page as its anchoring object.
The anchor between the two objects may be explicit or implicit. Consequently, Keep With Anchoring Object may have an effect even if you have not explicitly created an anchor between two objects.
Graphics Builder enables you to produce displays for inclusion in both forms and reports. A display can be an application by itself, or included in a form or report.
Use displays when you want to:
When creating graphics, keep the following guidelines in mind:
Here are some guidelines for implementing the most commonly used displays:
|
Copyright © 2000 Oracle Corporation. All Rights Reserved. |
|