Scope: managed applications, mobile applications, and ordinary applications.
1. When you develop the structure of an application, create different metadata objects for entities with different purpose. For example, the Companies catalog contains the company entity and the Departments catalog contains the department entity.
2. To adjust an entity, provide it with some attributes, so its behavior and content would serve the entity's purpose. For example, the Companies catalog can store both separate businesses and affiliates, which have parent company. The Employees catalog can store current and terminated employees.
To unambiguously define the status or the type of an object, assign it with ad hoc attributes. The attributes can contain a Boolean value or a list of values. It is not recommended to define an object indirectly. For example, when the object's type depends on whether the attribute has an entry or is empty.
In the Companies catalog, create the ParentCompany attribute. If the attribute is filled in, the company is considered an affiliate to the parent company. Otherwise, it is considered a separate business.
In the Companies catalog, create the IsAffiliate Boolean attribute. If the attribute value is True, the company is unambiguously considered an affiliate. If the value is False, the company is considered a separate business. Create the ParentCompany attribute that requires entry if IsAffiliate = True.
3. In some cases, Boolean attributes are unnecessary. For example, if the Employees catalog has attributes EmploymentDate and DismissalDate, then Boolean attributes Hired and Dismissed are excessive. In this case, the best practice is to create one attribute that lists all statuses. For example, the basic employee's statuses would be "hired", and "dismissed". Later, the list can be easily extended with new items, for example, "on probation".