Overview
Schema evolution is the process of changing the specifications or description of a JADE system. Schema instantiation is the process of bringing those changes to life and making the set of changes current. (For details about schema instantiation, see Chapter 14, "Database Reorganization".)
When you make a structural change to a class that has instances (for example, adding, deleting, or changing a property), the class and other related structures are versioned.
If the class is part of an RPS mapping, it is versioned even if it has no instances. This is necessary for the RPS Datapump application to behave correctly.
At this stage, there are two versions of the schema: the current version and the latest version. JADE uses these versions to reorganize the database, for example.
The current version contains the version of the class before the property was added, and matches the current structure of objects in the database. The latest version contains the version of the class after the property was added, although this ‘pending’ change has not yet been brought to life. The process in which the specification of a system changes is called schema evolution.
To bring to life the changes in the latest version, they must be made part of the current version. This process is called schema instantiation, which includes reorganizing the database. Importantly, much of this process can be carried out online. You need only to shut the system down for the final transition step.
When a JADE system is versioned, you see two versions of a schema where a change has been made; that is, the current schema context and the latest schema context. You can work in the current schema context and make changes to the current version of the system, or you can work in the latest schema context and make changes to the latest version. Changes made in the current schema context may change the behavior of any running application. In addition, not all changes made in the current schema context may be visible in the latest schema context.
For a number of common tasks, object versioning improves the performance of both the versioning and reorganization processes, resulting in faster development. Multiple schema contexts provide snapshots (that is, a version) of a schema specification, enabling you to work in multiple schema versions at the same time. The benefits of object versioning are:
-
Enhanced source control capabilities
-
Faster development
-
Making structural changes to the application while it is still running
-
Ability to work in multiple schema versions at the same time
Running an application from the JADE development environment by clicking the Run Application toolbar button and methods executed from the JadeScript class and a Workspace use the current version of objects.
The following is a summary of the main visible components of versioning in the JADE development environment.
-
The Schema Browser can show multiple instances of a specific schema. If a schema is versioned, both the current and latest schema context are displayed in the Schema Browser.
Although the latest version of a schema is displayed with a green background highlight by default, you can define your preferred version highlight color. You must select the appropriate schema version whose development environment forms you want to open.
-
The Class Browser includes Latest in its title if the browser is opened against the latest schema context. The Class Browser always displays only one instance of each class.
-
A composite view is available for the main source windows, which enables you to view additions, changes, and deletions to class constants, properties, and methods for a versioned class.
A composite view is available from the current or the latest schema context. If you are viewing a changed class constant, property, or method in a composite view, the browser displays two entries (one for the current and one for the latest version).
-
The Cashmere JADE skin is used by default to decorate any source window that is opened against the latest (not committed) version of a schema.
We recommend that you use a JADE skin to indicate versioning, as it provides strong visual feedback of the versioned state of your schema.
If required, remove or change the skin for the current version from the Window sheet of the User Preferences dialog and for the latest version from the Miscellaneous sheet of the User Preferences dialog.
-
Icons that are displayed for a versioned element include a small superimposed arrow that indicates the version of the element.
A white arrow pointing towards the left indicates the current version of the element and a green arrow pointing towards the right indicates the latest version of the element. (If the property or method is not versioned, no arrow is displayed in the icon.)
For an example of a composite view of browsers in a versioned schema, see "Components of Browsers in Versioned Schemas", later in this chapter.