Construct a Component

Most components can be created following the same basic procedure.

  • You must have created a project to contain your application definitions. For more information, see Working with Projects.
  • If the component will access data stored in a database, ensure that you have defined the modeled entities and relationships. For more information, see Define a Modeled Entity.
  1. Create a New Component.

    Uniface has different types of components suited to different purposes.

    Desktop applications use forms for the user interface. Web applications and mobile apps use server pages. All applications can use services to handle the business logic, but it you're application is multi-tier, you will also need session services for data access.

  2. Define the Component Structure

    For each component, define its data structure. This controls the data (component entities and fields) used in the component, the order in which data is processed, and the default behavior when it is stored or deleted. In most cases, component entities are created by inserting modeled entities. You can also create non-database entities that are specific to the component.

  3. Script the Component Behavior.

    For component entities and fields, write script modules that control component-specific behavior. For more information, see Script Modules.

  4. Create the Component Layout of Server Pages.

    For presentation components, design the layout and appearance of the component. For server pages, this is done using HTML.

  5. Click Compile to compile the component.
  6. Test the component. From the Actions menu, choose Test.

    This spawns a separate process and activates the exec operation of the component. When the component exits, control returns to the Uniface IDE.

    Tip: You can optionally specify test logicals in the ide.asn file to customize the test environment, providing command line switches that override the default behavior. For more information, see IDE Test Logicals.

Create libraries of global objects that components may require access to, such as messages, variables, and global ProcScript entries. For more information, see Create and Maintain Global Objects .

Related Topics