A Pattern Language for Developing Form Style Windows


By: M. Bradac, B. Fletcher
Published in: PLoPD3
Pages: 347-357
Category: GUI Development

Summary: A form organizes a collection of widgets to perform an operation. Nontrivial applications may use many specialized forms.

Pattern: Subform

Pages: 348-349

To minimize development and maintenance when designing form style windows in a GUI application, divide a form into subforms to construct the window. These subforms will contain groups of widgets to control related data. Any subform can be further divided into subforms.

Pattern: Alternative Subforms

Pages: 350

You're using Subform where different sets of data will be gathered based on a user response. To design a window where different sets of widgets are needed, compose a form using smaller subforms. Create one subform for each variation of the widgets that change and select the appropriate subform based on state data. Use Subform Selection

Pattern: Subform Selection

Pages: 351-353

You're using Alternative Subforms. To choose from a collection of subforms that become active based on state data, have the parent subform maintain a collection of all child subforms. When there is a change in state data, the parent polls each child using Subform Match. The most frequently used forms should be at the front of the collection for efficient performance.

Pattern: Subform Match

Pages: 353-355

You're using Subform Selection. How does the parent subform select the appropriate child subform based on state data in the parent? When there is a change in state data, poll the collection of subforms and let them identify themselves as a match for the state data.

Pattern: Subform Mismatch

Pages: 355-356

You're using Subform Match where state data resides in the child subform. How can the parent subform determine when a child subform no longer applies based on a change of state data in the child? Have the child subform notify its parent when there is a mismatch.