Migration of Uniface 9 Defaults

Uniface 9 used a default set of objects to create new objects. These are known as the Uniface defaults, and automatically loaded from the udefault.xml file the very first time the Uniface 9 Development Environment is started.

The udefault.xml file contains:

  • Default objects used to create new entities, components, and other development objects
  • A Uniface 9 component template for entity services, called UESVDEF
  • A library (called U) of Include Procs used in the default component objects.

There are some circumstances in which you should migrate some or all of the Uniface 9 defaults:

  • Default objects have been specialized to meet customer requirements and coding standards, and you want to continue using these default objects in Uniface 10.
  • Entity services have been created using the UESVDEF component template.
  • The Include Procs are used, or are still referenced in some components.

    References to Include Procs that are not available can result in many compiler warnings about missing Include Procs. You can choose to remove references (prior to migration) that are not actually used, or to migrate the U library.

In all other cases, we recommend that you not migrate the Uniface defaults to prevent unused data in the Repository. In this case, if you use the Uniface 9 Export form, make sure the option Exclude Uniface defaults is selected.

Deciding Whether to Migrate Defaults

To help you determine whether any or all of the Uniface defaults should be migrated, you should understand what udefault.xml contains, how it differs from Uniface 10, and how default objects are migrated to Uniface 10.

  • Default objects are sample records in specific tables that are copied to create new objects. Any default code in components and entities is copied from these default records. For example:

    • For components, a sample UFORM record with a specific name (a name per component type) is copied. Any code in the default object was copied to the new component.
    • For component entities, a UXGROUP record is copied
    • For fields a UXFIELD record is copied.

    Similarly, copies of records were made when creating new modeled entities and their related objects (subtypes, keys and fields), and new start-up shells.

    In Uniface 10, templates selected in the Resource Browser perform the same function. Like the Uniface defaults, they are objects that are copied to create new objects. Unlike the defaults in Uniface 9, there can be many templates for each object type. Uniface delivers an extensive set of default templates, which replace the Uniface 9 defaults.

    If you have specialized the default objects provided in Uniface 9 and would like to continue to use them in Uniface 10, you should migrate them. During import, they are automatically migrated to a set of Uniface 10 palettes and templates which are visible when browsing in the Resource Browser as Legacy Templates.

  • One of the default objects is a component template called UESVDEF. When a new entity service was created without a component template, the contents of this object were copied to create the new component.

    However, it was also possible to use UESVDEF as a component template, in which case the resulting attached components inherited properties and ProcScript. When migrated, these attached components still need UESVDEF to be available.

    In Uniface 10, component templates are called modeled components and it is possible to create new components from either a template (which is copied) or a modeled component, which is inherited.

    If UESVDEF was not used as a component template to create entity services, there is no need to migrate it. Otherwise, you will need to migrate to ensure that your entity services continue to work. In this case, UESVDEF is migrated to a modeled component. Entity services that were attached to UESVDEF are migrated to derived entity services.

  • Include Procs in the U library are used in the default component objects.

    The Uniface 10 default templates no longer refer to these Include Procs, but migrated components might. In this case, you may want to migrate this library to Uniface 10. The library is migrated to a typed IncludeScript library called U and the Include Procs are migrated to IncludeScript objects.