Loading...
 

Fautore - Configuration Management

This is a document to describe the structure of the Fautore configuration management strategy and how it is used.

Overview

The strategy in brief is to have system configuration values updated via CGI generated screens presented through the Fautore application. All characteristics of the configuration item is stored in a table. The table will store a value key, its associated value, the CGI display characteristics for the value, the CGI validation specification for the value, a grouping value by which similar configuration items will be related, and the metadata tracking information around value changes.

Table Structure

The below table defines the database table columns and their purpose.
Table Name: SystemSettings
Primary key: CfgItem

Create Statement
CREATE TABLE IF NOT EXISTS `fautore`.`SystemSettings` ( `CfgItem` VARCHAR(64) NOT NULL, `CfgValue` VARCHAR(128) NULL, `CfgDefault` VARCHAR(128) NULL, `Permission` VARCHAR(128) NULL, `Group` VARCHAR(64) NULL, `ChangedBy` VARCHAR(45) NULL, `ChangedDate` DATETIME NULL, `DisplaySpec` VARCHAR(1024) NULL, `ValidateSpec` VARCHAR(1024) NULL, `Help` VARCHAR(256) NULL PRIMARY KEY (`CfgItem`));

Column Type Purpose
CfgItem varchar(64) The configuration item name as referenced within the application code.
CfgValue varchar(128) The member defined value for the configuration item
CfgDef varchar(128) System default value to use to reset configuration items or in the case an individual configuration item value is made unusable somehow.
Permission varchar(128) Value used to define tribe members capable of changing a particular configuration item. Default to Chieftain only.
Group varchar(64) Value used to group configuration items supporting similar functionality together for convenient display.
ChangedBy varchar(45) Username of member that last changed the value
ChangedDate Date Date the configuration item value last changed the value
DisplaySpec varchar(1024) Specification to define how the field should be displayed. (See "Display Specification" below.)
ValidateSpec varchar(1024) Specification to define how configuration item value should be validated. (See "Validate Specification" below.)
HelpText varchar(256) Descriptive text used to explain the configuration item purpose in the data entry form.

Display Specification

The display specification is made up of 3 double tilde (~~) delimited fields.

Field Purpose Description
Type Define input type This field defines the type of form field to be used collecting configuration data from the tribe member. Field types may have subfields to further define their use. (See "Display Types" below for details.)
Label Field label (or prompt) The field label to use for the value being collected. This could also be considered the "prompt."
Detail Define field details This field could have any of several format definitions dependent on the provided "Type" value. (See "Display Types" below for details.)

Display Types

The display types listed below are valid for use in the "Type" field to the data value of the "DisplaySpec" column of the "SystemSettings" database table.

Type Description Detail
text Simple text field.
DxM
The Detail specification is an 'x' delimited definition of "Display Size" (D) and "Maximum Size" (M). The Display size is trimmed to "Max Size" if it is larger than that value. A single undelimited value indicates a display size of unlimited size. A delimited single value indicates "Display Size" and "Max Size" are the same..

Examples:
text~~Name~~24
Field labelled as "Name" with display length 24 and unlimited length.
text~~Name~~24x
Field labelled as "Name" with display length 24 and 24 character max length.
text~~Name~~24x48
Field labelled as "Name" with display length 24 and a max length of 48.
textarea Multi-line text area
RxC
The Detail specification is an 'x' delimited definition of "Rows" (R) and "Columns" (C). The row default is "3" and the column default is 60. Specifying only a single number with no delimiter will set the number of columns (width). The context of a single number with the 'x' delimiter depends on which side of the delimiter the number is on..

Examples:
textarea~~Notes~~x42
Field labelled as "Notes" with display width of 42 and the default 3 rows (depth). This is the same as specifying "x42".
textarea~~Notes~~7x
Field labelled as "Notes" with display length of the default 60 column (width) and 7 rows deep.
select Selection field
dispval:selval,dispval:selval,dispval:selval
A comma separated pairing of select field "Display Value" (dispval) and "Selected Value" (selval) The dispval's are displayed in a dropdown list. The associated selval is saved to the database when that item is selected. Any item listed twice is considered the default value when displayed..

Examples:
select~~Treat~~Soda:S,Candy:C,Nuts:N
Present three treats in a dropdown list with associated acronym being saved out when a choice it made.
select~~Option~~A:1,B:2,B:2,C:3
Present three options in a dropdown list with associated numeric value being saved out when a choice it made. The "B" option is the default choice.
radio Radio field set
dispval:selval,dispval:selval,dispval:selval
A comma separated pairing of radio field "Display Value" (dispval) and "Selected Value" (selval) The dispval's are displayed in a radio button configuration. The associated selval is saved to the database when that item is selected. Any item listed twice is considered the default value when displayed..

Examples:
radio~~Broadcast~~Radio:r,TV:t,Stream:s
Present three treats in a radio button set with associated acronym being saved out representing the choice made.
radio~~Broadcast~~Radio:r,Radio:r,TV:t,Stream:s
Present three treats in a radio button set with associated acronym being saved out representing the choice made. "Radio is the default choice.
checkbox Checkbox field
x:y

The label is displayed with only a checkbox for entry. The 'x' parameter defines the unselected state. The 'y' parameter defines the selected state. The 'x' and 'y' parameters must be defined as a complete set, or not at all. A complete absence of x/y parameters defaults to x=0 and y=1.

Examples:
checkbox~~Hidden
Display a checkbox with a label of "Hidden". The unchecked value will be recorded as the default of "0". The checked value will be recorded as the default value of "1".

checkbox~~Hidden~~false:true
Display a checkbox with a label of "Hidden". The unchecked value will be recorded as of "false". The checked value will be recorded as value of "true".

Validate Specification

The validation functionality is boolean in its result. The runtime value provided to the field being defined will be evaluated to either pass or fail the defined specification. There is no "sort of."
The specification entered to this field is a label value specifying the "Type" of validation separated by double tilde's (~~) from the actual verification definition. Multiple verification definitions can be specified by separating them with a hash tilde (#~) combination.

Type Description Detail
minval No less than Single numeric value specifying the lowest number acceptable in the field. This number is inclusive. If "minval~~3" is specified in this field then a runtime value of "3" will pass, "2.9999" will fail. Non-numeric characters will also fail.
maxval No greater than Single numeric value specifying the highest number acceptable in the field. This number is inclusive. If "max~~42" is specified in this field then a runtime value of "42" will pass, "42.0001" will fail. Non-numeric characters will also fail.
minmaxval Between these values A colon separated set of two values. The left hand value indicates the low end of the range, the right hand side of the colon indicates the high end of the range. With a setting of "minmaxval~~3:42" a value of 3 will pass, 21 will pass, 42 will pass, 2 and 43 will both fail. Non-numeric characters will also fail.
minlen No smaller than Single numeric value specifying the shortest acceptable length of value in the field.
maxlen No larger than Single numeric value specifying the longest acceptable length of value in the field.
minmaxlen Between these values in length A colon separated set of two values. The left hand value indicates the shortest acceptable length, the right hand side of the colon indicates the high end of the range. With a setting of "minmaxlen~~7:64" a value of length 7 will pass, and of length 64 will pass. Anything outside that range will fail.
regex Regular expression Any valid regular expression for use in verifying the runtime data value entry. The regex need not be bracketed by slashes. A regex that might be written as "/(?!\w)/" to verify a value is numeric in other circumstances should be written as "(?!\w)" for use in this field.
Seven steps to using the Internet in privacy as a respected Netizen.
  1. Perspective
  2. Search
  3. Email
  4. Social Security
  5. Have Presence
  6. Take Control
  7. Break The Ties

Shoutbox

Steve: Fautore 0.6.0.0 is now released and available to our registered Alpha participants!
Steve: Fautore 5.3.0 is now released and includes dynamically updated stats reporting!
Steve: Fautore 0.5.2.3 FILES.pm patch is up on the site. Thanks for the inputs. Keep it coming. We'll make Fautore a reality together.