Progress
ADM 2 Guide
SmartObjects
The ADM is grounded in the idea that you can create external procedure objects, called SmartObjects, that represent standardized components with useful behavior. A SmartObject is defined by a procedure file called a SmartObject master, which is external to the application that instantiates the SmartObject.
SmartObjects are smart because they provide the essential functionality required for building an application. A SmartObject application component is encapsulated: it contains all of the information relevant to itself and all of the actions that it can perform. It gets its visual features, user input capabilities, and database access abilities by encapsulating the functionality of basic objects and 4GL constructs in its procedure files within the communication framework of the ADM. Note the difference between using a basic object and a SmartObject in an application:
- When an application uses a basic object directly, the 4GL statements that define that object are written into the application’s procedure file.
- When an application uses a SmartObject that encapsulates a basic object, the 4GL statements that define the basic object are written into the SmartObject’s procedure file.
The ADM achieves encapsulation by providing a standard architecture (described in the "ADM Classes" section) for building reusable and maintainable objects, and by providing a standard communication interface (see the "SmartLinks" section) that allows these objects to interoperate.
The external procedure file that defines a particular SmartObject—the SmartObject master—begins as a copy of one of a number of SmartObject templates that the ADM provides. With certain exceptions, each SmartObject type corresponds to a different SmartObject template. Each SmartObject also has one or more standard include files (see the "ADM Classes" section) that define its properties and other aspects of its functionality. In addition, each SmartObject has one or more super procedures, which contain the internal procedures and functions that provide the SmartObject with its smart behavior. Any entity that interacts with a SmartObject—another object in the application or a user running the application—does so by telling the SmartObject to perform an action of some type.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |