27.2.1 Using Separate Modules
When an application uses multiple top−level windows, such as a main window and various dialog boxes, it makes
sense to describe each window in a separate UIL module. When a window is especially complex, you may want to
describe the interface using several modules. For example, the menu system of an application could be described in a
separate module, as illustrated by the example in Chapter 25, Building an Application With UIL.
When you divide an application into separate modules, it is easier to find specific declarations or definitions because
the modules map directly to the appearance of the interface. Multiple files also help to reduce editing conflicts when
you are working on a project with a team of programmers. Breaking components into separate files helps to eliminate
dependencies between logically separate parts of the interface. For example, if you make a change to a dialog, it
shouldn't affect any other parts of the interface. Another benefit is rapid prototyping and testing. With a few
modifications, you can use the showuid program from Chapter 24, Creating a User Interface With UIL, to preview a
component without needing to have a complete application program. We'll take a closer look at prototyping a user
interface later in this chapter.
27.2.2 Organizing Within a Module
Within a UIL module, one organizational decision involves whether widgets are declared from the top−down or from
the bottom−up. Top−down organization means that you define the parent ...