Scope: managed applications, mobile applications, and ordinary applications.
Best practices 1. Use object modules to implement behavior of particular object instances (CatalogObject, DocumentObject, and other). Object modules include procedures and functions that manage the object data (ThisObject and object module variables), including when it is not written to the infobase yet. For example, the following objects can be placed in object modules:
Note that whenever you need to call export procedures and functions of the object module from other modules, you might need to preliminary get an object instance from the infobase using the GetObject method. In this case, the whole object with its tabular sections is imported from the infobase. It is a resource-consuming operation.
2. Use object manager modules to place static functionality that is logically linked to a metadata object but does not depend on a particular data object instance state. These might be the following procedures and functions:
To execute object manager module functions, no data object instance is required (CatalogObject, DocumentObject, and other). 3. If a functionality cannot be referred to a particular metadata object, it is considered logically common for several objects. In this case, place it in a common module.
|