Searching Resource Locations

When an application needs a resource, Uniface searches for that resource in each of the application's resource locations, in the order specified in the assignment files. Uniface stops searching as soon as it finds the requested resource.

One of the resource locations is always the Uniface archive USYS:usys.uar, which is listed in the [RESOURCES] section of the usys.asn file that all applications use.

Generic Search Mechanism

For the following resources, Uniface can either find it or not:

  • Application Shell
  • Component
  • Entity descriptor
  • DTD
  • Signature

For resources in libraries, Uniface continues the search for a fallback resource if it cannot find the requested one. For example if it can't find the French version of a message, it will look for the USA version. For more information, see Search Order for Global Objects .

Enhancing Search Performance

You specify the resource locations in the [RESOURCES] section of the application's assignment files. If you have many resource locations, or the specified resources are not available, this can affect application performance.

There are several ways in which you can improve performance of resource searches:

  • Minimize the number of resource locations specified in the [RESOURCES] section of the assignment file. The lower the number of locations, the fewer places Uniface has to search.
  • If possible, have the application's resource locations available on the local machine, especially when network traffic might be a bottleneck.
    • If you need remote resource locations, consider using network shares rather than using a client-server connection.
    • If this is not possible, and you have several remote resources on the same machine, specify a plain network path as the resource location in the application's assignment file. This ensures that the search is delegated to the server, thereby reducing the need for separate network requests for each remote resource location.
  • Use UARs rather than directories for your resource locations.
    • However, if you use remote resource locations and your network has stability issues, use directories rather than UARs.