Database Solutions - Hints & Tips

Tip 23:
Subsystems

The Problem

In large applications, managing the many hundreds or even thousands of various components can become a difficult task. This task is made even more complicated with the introduction of the assembly workbench, in which the links between various components can be examined and manipulated.

The Solution

New in UNIFACE 7.2.04 are component subsystems, which can be used to logically group components in the same way an application model is used to group entities. When a component is created, it is automatically added to UNIFACE’s "Default" subsystem. If the component is required in a different subsystem, it must be moved manually (explained later). Grouping components into subsystems has the following benefits;

  1. The system can be separated into logical groups, for example, Customer-related components, Invoice-related components etc. For systems that limit the length of component names (e.g., 8 characters for Windows 3.1 applications), this can be useful in determining the component’s purpose of behaviour.
  2. When exporting components, it may be necessary to only export components concerned with a particular area of the application (e.g, all components used for the "Invoicing" part of the application). Although naming conventions can sometimes be used to overcome this problem, it is not always the case. In UNIFACE 7.2.04, the export screen allows components to be exported either by name or by subsystem, thus allowing a set of logically grouped components to be exported together.
  3. If version control is being used, logically grouped subsystems can be utilised to speed up the process.
  4. Within the Assembly Workbench, components are automatically listed in a tree structure according to their respective subsystem. By grouping components, the manipulation of objects within the workbench becomes more manageable.

Adding components to subsystems

There are two ways to move components from one subsystem to another (or from the default subsystem to a named subsystem).

Assembly Workbench

  1. The Assembly Workbench contains a "Subsystem" menu, providing facilities for the addition, deletion and maintenance of subsystems, and for the moving of components from one subsystem to another;

tip24_img01.gif (5987 bytes)

  • "New" brings up a screen allowing the name for a new subsystem to be entered. Once created, components can be moved to this subsystem.
  • "Delete" will attempt to delete the current subsystem; in the example shown above, this would mean the subsystem "Test" would be deleted. This action will fail if the subsystem contains components.
  • "Properties" will bring up a screen allowing a description to be entered for the current subsystem (Note: this description field is not available from the "New" screen).
  • "Move Components" brings up the following screen;

tip24_img02.gif (2429 bytes)

  1. From this screen, a component name, or component name profile can be entered and moved to the named subsystem. In the example, below, all components beginning with "Skill" will be moved to the subsystem "Test".

tip24_img03.gif (2519 bytes)

  1. This results in the following change to the Tree Window;

tip24_img04.gif (9142 bytes)

Global Update - Signatures

The Global Update screen for signatures has an update property allowing components to be moved from one component to another. This is achieved as follows;

  1. As with all other Global Update screens, a profile must first be set to retrieve the required objects. Once the profile has been entered, the screen will look as follows (in this case, a profile of "Skill*" was entered for the component’s name);

tip24_img05.gif (8704 bytes)
This screen lists certain properties for the currently highlighted component. In the screen above, component "SKILL_TYPE" belongs to the "Default" Subsystem.

  1. The "File" menu contains an option for "Set Property Update". Selecting this option produces the following screen;

tip24_img06.gif (5432 bytes)

  1. In this screen, a new "Subsystem" can be entered (in the example above, a subsystem "Test" has been entered). Pressing "OK" produces a dialogue box requesting user confirmation. Upon confirmation, the update will be performed. The update from the example above produces the following screen:

tip24_img07.gif (8802 bytes)

  1. This shows that the component SKILL_TYPE (and all other components beginning with the word "SKILL") now belongs to the "TEST" subsystem.

Exporting Using Subsystems

The example below shows a section of the UNIFACE 7.2.04 Export Screen. In this example, the developer has chosen to export all components from within the "TEST" subsystem. Clicking the "Default" checkbox will allow all components in UNIFACE’s "Default" subsystem to be exported.

tip24_img08.gif (3158 bytes)

Rules

The following rules apply to subsystems:

  1. Each subsystem must have a unique name within the repository.
  2. The subsystem’s length can be a maximum of 16 characters.
  3. The "default" subsystem cannot be deleted.
  4. A component can only exist within one subsystem.
  5. Nesting of subsystems (i.e., a subsystem within a subsystem) is not allowed.
  6. All new components, and components migrated from previous UNIFACE versions are automatically included in the "Default" library.

compuware_01.gif (3977 bytes)


Copyright ©2000 OCS Consulting plc

dbs_block_logo.gif (2150 bytes)
Refresh Frames