4GL Patterns #7 – Data Dictionaries

RAD thrives on autogenerated forms, autogenerated bindings, and autogenerated validation rules.

To support RAD, database dictionaries should contain hints that form libraries can use.

Here is a compilation of useful rules, gleaned from several forms libraries (XForms, MS Access):

  • field caption
  • tooltip
  • default value
  • full text search (KeywordIndex)
  • isMetadata (Archetypes Field Reference)
  • postback (Archetypes Field Reference) – False for password fields. If validation fails, user will have to re-enter the value
  • help text (can be also used to generate documentation)
  • default format (currency, scientific, precision, short date)
  • look up fields (MS Access – a foreignkey can be displayed as a prepopulated ListBox or a ComboBox)
  • multivalued – one-to-many relationship (Archetypes Field Reference
  • min and max value (Compiere)
  • DB Column Name (Compiere)
  • Reference?
  • Parent Link Column (Compiere) – like Access Tables ?
  • Read Only logic (Compiere) – condition, if true, makes column read-only (useful when data is populated from another application)
  • Mandatory logic (Compiere) – condition, if true, makes column mandatory
  • hints on empty fields (see David Walsh’s article)
  • field validation rules, field validation text (MS Access, Spring Validation)
  • Permissions (MSAccess, Zope management screens),
  • Run-with-Owners-Permissions (MS Access)
  • Computed expressions (including SUM from related tables)
  • Preferred positioning. Examples from
    • Interleave database
    • Microsoft InfoPath – fields are set to 50%, 33% or 25% width
    • Field Group (Compiere)
    • Schemata – Use named schematas to organize fields into grouped views (Archetypes)
  • Widget (Archetypes) – in addition to the common TextWidget, you might have PickListWidget, CalendarWidget, ImageWidget
  • High Volume (Compiere) – shows search box instead of pick list
  • Encrypted (see Compiere metadata demo )

Visual Examples

In the forms designer, Microsoft Access shows association between input controls and their labels. Changes made in the form does not change the data dictionary. However, it may still be useful for internationalizing applications.

Visually displaying association of UI elements

Visually displaying association of UI elements

You should follow me on twitter here

One Response to “4GL Patterns #7 – Data Dictionaries”

  1. Database Patterns realized with AribaWeb | Chui’s counterpoint writes:

    [...] came across a aribaweb.org on TheServerSide. It uses an approach described in data dictionaries as a database pattern to generate metadata-driven [...]

Leave a Reply