5.2.7 Rules Definition through VML

It is the objective of AOA to define as much of an application as possible using non-procedural design structures, such as in the LOD, Dialog and Report definitions. However, it is always necessary at some points to specify processing through procedural rules. In fact, though we usually consider non-procedural statements as simpler, that is not always the case. SQL is an example of a non-procedural language that can easily be used to create statements so complex that they can only be deciphered by an expert in the language.

VML is the rules language (sometimes called a Domain Specific Language) of AOA that is used to define data rules and work flow processing. It has the typical logical structures common to programming languages, such as IF, FOR and WHILE. However, its unique characteristic is its reference to object data through a group of special statements that reference object data through the triad of View Name, Entity Name and Attribute Name. Thus, while the physical structure of data is encapsulated and hidden from the rule, its logical structure is openly revealed.

Thus, a statement to compare an attribute value to a constant would look like:

 

 

Or to compare two attribute values:

 

A statement to loop through all the entities under a parent might be:

 

 

And a statement to read persistent data from a database:

 

 

Or a statement to position on a particular entity within an object might be:

 

 

VML uses such statements to “navigate” through the data in one or more objects to transform data or manage work flow. A number of VML examples are used to display functional aspects of AOA further on in this presentation.