DX provides advanced facilities to help developers leverage existing work. Together, these tools support a development approach that maximizes software reuse, improves application consistency and minimizes future maintenance requirements..
DX's software reuse features are organized into four categories:
- Classes and Subclasses
- User-Defined Collections
Classes and Subclasses
With DX, object-oriented design doesn't just mean generating C++. It means creating and modifying classes and subclasses, the ability to group resources into styles, and the availability of managers to further modularize application pieces. It also means the ability to easily share these resources with other developers and organize them for future application needs.
With DX, creating classes is as easy as selecting a widget or group of widgets and choosing the "Make Class" menu option. Once a class is created, it is automatically saved on the Palette and can be reused as often as needed. Classes can also be quickly saved into a local class section of the Palette for reuse in future applications, or in a system class section made available to all developers. This makes it easy to create a library of user interface elements ready to use in current and future projects.
Subclassing provides a way to create one or more variations of an existing class. For example, suppose you have a class that you are likely to use in different applications, but the class will be slightly different in each application. You can create the class, and create as many subclasses as necessary from that class. Each subclass inherits the attributes and behavior of the class from which it is created. You can then specialize each subclass by adding new behaviors.
A user-defined collection is one or more widgets and associated resource settings that you save as a group on the Palette. Collections provide a handy way of providing convenient access to all your most commonly-used widgets and resource settings.
An example of a collection is the Control Panel, which is a container of control buttons. When you click on the Control Panel widget icon on the Palette, then place the widget outline on an interface, a pre-defined collection of widgets with specific resource settings is created. You can then edit the resources of any widget in that collection, if needed.
DX styles are user-defined groups of widget resource settings. Styles act like a database of resource information: they remember which resources have been set for each widget throughout the application. Like classes, when you change a style, every widget governed by that style will immediately reflect the change.
Together, DX classes, controlling the user interface architecture, and DX styles, governing the application "look and feel", create a powerful object-oriented design environment capable of supporting large, complex GUI projects.
Managers enable you to customize DX by adding your own constants, identifiers and types.
Once you create and save a constant or identifier, it will be added to an option list in the Resource Editor and all appropriate extended editors. Alternatively, you can enter the constant or identifier name in a resource's input field. This puts your constants and identifiers at top-of-mind for every developer sharing your DX environment.
DX managers provide an easy way to organize all the pieces of GUI applications. By storing application pieces in a central, easy-to-access place, DX encourages project-wide consistency and software reuse.
- Refer to Object-oriented Features in DX HyperHelp.