Application-Level Processing

Application-level processing affects the whole application and occurs in the application shell, the module used to initialize and run a a Uniface application or server.

Application-level processing can occur in response to events such as starting the application, receiving requests from a browser (in the case of the web applications), receiving other requests or asynchronous messages, or exiting the application.

When an application is started, Uniface creates an instance of the application shell and activates its apStart trigger, which in turn activates a component. The application shell passes control to the component but retains control of application-level events and processing, such as application interrupts, or quitting an application. When the last application component exits, control is returned to the application shell.

Scripting

You can script the following types of processing at the application level:

  • Setting or verifying environment parameters, such as the default language or client browser.
  • User-defined authentication
  • Logging information in log or audit files
  • Starting components.
  • Application exit routines before the application closes.
  • Handling asynchronous messages received during the application session.
  • Handling asynchronous messages from the application user (desktop applications only).

Some events, such as receiving an asynchronous message, can be handled at either the application or the component level. You can define default processing in the receiveMessage trigger of the application and override it with local variations in components. The lowest level that is defined takes precedence.

In desktop applications, an application shell has a menu trigger that handles requests for the menu attached to the application shell. Form components have their own menu trigger for handling request for the menu associated with the form.

You cannot perform database I/O at the application level; this is handled at the component level. An application shell that does not run a component is meaningless.

Related Topics