Understanding IDOs
An Intelligent Data Object (IDO) is a business object that encapsulates units of information and logic that are called from the client layer to interact with data in the database. The job of the IDO is to transport collections of data back and forth, with any validation or rules needed, between the client and the database.
IDO Elements
An IDO consists of these elements:
- A set of one or more SQL tables. Each table contains the data for a specified part of the application and must include columns (properties) that Mongoose requires to work properly.
- A set of properties. A property may represent persistent data stored in the application database, derived data, or temporary data used to communicate information to the middle tier. A property may also represent a whole subcollection of data.
- A set of standard methods. All IDOs implement the methods
LoadCollection, UpdateCollection, GetPropertyInfo, and Invoke:
- LoadCollection retrieves a collection of rows from the database.
- UpdateCollection takes a set of rows marked for insert, update, or delete, and executes the appropriate SQL code against the database.
- GetPropertyInfo returns detailed information about the properties supported by the IDO.
- Invoke allows you to execute a custom method.
Through configurations, application databases are linked with an objects database and a forms database.
Defining an IDO
IDO forms serve as a development environment for IDOs. IDO definitions are stored as metadata in the objects database. You can edit the metadata through the IDO forms.
The IDOs form is where you start to define an IDO. IDO definitions include:
- Attributes for the IDO itself
- References to tables in the application database
- Property definitions for table columns
- Metadata about methods defined for the IDO
You can access all of these elements from this form. You can also access the row-level security that can be defined for IDOs.
The metadata that you edit in the IDOs form is stored in the objects database.
Existing IDOs must be checked out before they can be edited. You can only check out IDOs that have the same Access As setting as your environment.
You can also perform these tasks in the IDOs form:
- Add, edit, or delete an IDONote: You can use deletion rules to determine what is to happen when one or more records meet specified criteria for other IDOs that reference properties in the one you want to delete. Define these deletion rules on the Rules tab.
- View the elements and attributes of an IDO
- Edit or remove an IDO table
- Add a base or secondary table to an IDO
- Add a property to an IDO
- Edit an IDO property
- Add a method to an IDO
- Edit a method
Using an IDO
Forms use IDOs in multiple ways. Forms that interact with the application database data define collections based on IDOs. Many types of validators and list sources are built over IDOs.