|
The Data Dictionary
Clarion maintains metabases containing sharable business logic, application logic, and user interface descriptors. These metabases are its Data Dictionary and the Template Registry — code generating system. These are accessible to multiple programmers for use in multiple applications. When using the template code generating system, developers can run an application wizard which lays out a complete application that provides multi-user ready data grids, update forms and reports for each table. A developer then adds more specific functionality through a template interface of fill-in boxes, options, and pull-down choices, and selecting options for code driven tasks which were built into the template by the template programmer.When editing the look and feel— spin boxes, drop lists, combo boxes, etc., , the developer uses visual window and report formatters whose starting points are automatically generated layouts based on the properties for "look and feel" options which were stored in the Data Dictionary.The Data Dictionary is the starting point for development. The Data Dictionary stores:
- Database Schema: a description of the layout of the data, such as its physical location, tables, column properties. It can even store tables from multiple data sources, such as tables from an Oracle database, plus tables from a Microsoft SQL Server database, making both available to any applications generated from the dictionary). It can store many options, such as user ID, password, even driver strings which function as commands upon initial connections to the database. The illustration below shows the property choices for a relation between two tables.
- Business Logic: includes constraints and validation rules, such as an employee may have only one social security number, or item discount may not exceed item price, or customer numbers in one table must exist in a master customer table. It goes much further storing values such as status bar help messages for each field, and default values used when adding a new record. The Application Generator uses the Data Dictionary to generate source code, such as file structures, which it places in the data section of the generated source code files. It also uses the dictionary to provide default picture tokens for the data entry. Picture tokens provide a masking format for displaying and editing variables. There are seven types of picture tokens: numeric and currency, scientific notation, string, date, time, pattern, and key-in template pictures.
- User Interface controls: the Dictionary metadata allows for applications to default specific user controls for individual columns for each table in your database. This provides a great degree of advance formatting, e.g., you may specify that for generated forms for the Products table, the discount column should always default to use a spin control to edit this value, and that the control should have a certain color and font, a low and high range of valid values, and that each press of the increase or decrease buttons on the spin control raise or lower the value by a certain step value. The programmer, of course, may change the defaults in the generated form. Storing these items in the dictionary encourages standard behavior for applications referencing this data, and saves development time for any shop which must reference the same data in more than one application.
Clarion Enterprise Edition also includes the Data Diagrammer component, which provides a graphical interface to the dictionary, as well as other options, such as generating SQL statements to create a new database based on the layout defined in the Data Dictionary. The illustration below shows the column properties within a dictionary:

The Clarion Data Dictionary is the heart of the every project, you can click here to view a step by step overview of building a data dictionary. Please note this page has many graphics.
|