Progress
ADM 2 Guide
Introduction
In some circumstances when developing Progress 4GL applications that use SmartObjects, it is necessary or useful to create a new ADM class. Suppose, for example, that you have a number of SmartDataBrowser master files that share some set of properties and/or behaviors beyond what is supported in the SmartDataBrowser as shipped, but that have other properties and/or behaviors that are unique to each master. You can create a new SmartDataBrowser template that includes the common functionality as standard behavior, and then build master files from this new template. Your custom SmartDataBrowser constitutes an extension of the ADM—a new ADM class.
Before you begin to develop a new ADM class, be sure that you understand the basic ADM architecture as described in "Overview," and are familiar with the material in the other chapters of this manual.
NOTE: The current ADM file structure is different from that in earlier ADM versions, and takes advantage of core features that did not exist in those versions. If you implemented your own customizations to the standard ADM classes, please note that the current ADM version does not support backward compatibility. Progress Software Corporation recommends that you convert your applications to use the ADM custom files, as described in this chapter.There are three ways to extend the ADM class hierarchy:
Figure 8–1 shows the ADM class hierarchy for SmartFrames, to help illustrate bottom-level extensions.
Figure 8–1: ADM Hierarchical Class Structure for SmartFrames
![]()
The top (root) of the hierarchy is the smart class, which contains the essential behavior shared by all SmartObjects. (Recall that the smart class is the root object for all SmartObjects.) As you work down the tree, you encounter successively more specific classes of behavior; in this case, the visual class and then the container class. The standard SmartObject templates are all based on bottom-level (leaf-level) ADM classes.
You use the New ADM Class tool to create the new ADM class files, then modify the standard class files by adding Progress 4GL code as required to provide behavior specific to your class. For details, see the "Creating a New Class at the Bottom of the ADM Class Hierarchy" section.
- Customize an existing class—Customizing an existing ADM class allows you to extend or modify its behavior by modifying the custom files that are built into it. You do not create any new class files when you customize an existing class: you simply change the behavior of a class by adding Progress 4GL code to one or more of its custom class files. For details, see the "Customizing an Existing ADM Class" section.
NOTE: Progress Software Corporation strongly recommends that you do not create a new class in the middle of the ADM class hierarchy. It requires extensive knowledge of the ADM and entails significant risk of damaging your Progress installation.- Create a new class in the middle of the ADM hierarchy—You create a new class at the middle of the ADM class hierarchy by inserting a new class between two existing classes. This approach allows you to change or extend the standard behavior of existing SmartObjects. However, you should be able to handle most extension needs either by creating a new class at the bottom of the hierarchy or by customizing an existing class.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |