|
Sharing the Knowledge
Linear Blue coding standards & examples
version: 3.1
Jump to:
Fields...
Tables...
Scripts...
Objects...
Custom Functions...
Please feel free to email us regarding any comments you may have on the Linear Blue coding standards at standards@linearblue.com
FIELDS
| Prefix |
Name |
Description |
| __kp |
Primary Key |
Auto enter serial number unique to each record. |
| _ks |
Secondary Key |
Key field used to relate to another key field (either from the same table or from another). |
| _kf |
Foreign Key |
Key field used to relate to the primary key from another table. |
| d |
Data |
All user data fields. |
| a |
Account |
Account or user information. |
| b |
Button |
Fields used for displaying button graphics or text. |
| c |
Constant |
Fixed data within a calculation, i.e. Admin Link. |
| e |
External Plug-ins |
All fields related to plug-in functionality. |
| f |
Filter / Find |
Global and calculation fields used for searching and filtering a portal. |
| h |
Help |
Fields used as part of the help system. |
|
| l |
Layout |
Information related to the layout, i.e. Tabs |
| m |
Module / Menu |
Menu related fields. |
| n |
Navigation |
Used for Back / Forward / History functionality. |
| p |
Preferences |
Fields that are used across the system. |
| r |
Record |
Auto entered data related to the record, i.e. Creation name, etc. |
| s |
Summary |
Summary fields. |
| t |
Table |
Fields that store table related information, i.e. Current record count |
| u |
Utility |
For use with utility fields, i.e. value lists. |
| v |
Variables |
Used to store temporary global information. |
All spaces should be replaced by underscores.
All key fields, unless otherwise indicated, will be number fields. If a key field is text it must be indicated by adding a "_t" suffix. Key fields should be prefixed with a single underscore and primary keys with a double (this allows the fields to appear at the top of a list alphabetically).
Fields used as flags should have the following suffix added to them: "_Flag" followed by "_n" if it's a number and "_t" if it's text. Moreover all flags should be commented showing a comma-delimited list of possible values and whether a value is auto-entered (square brackets).
Example field names:
__kp_COMPANY
__kp_t_COMPANY
_ks_Company_Type
_kf_Staff
d_Address_1
d_Status_Flag_n
v_Text_9
v_kf_Company
Note: the number after a variable will indicate the number of repetitions that field is set to store.
TABLE NAMES
All table names throughout the system will be in singular and uppercase.
TABLE OCCURENCES
There are four primary formats for a Table Occurrence:
1. Stand alone table (Utils) denoted by an underscore at the beginning and then the Table name in Uppercase.
Local tables are coloured black and remote tables are coloured light grey.
2. If a Table Occurrence relates to the same table as the primary TO then it appears in uppercase with the function name at the end, i.e. Search.
Occurrences for the same primary table all have the same colour.
3. If a Table Occurrence is not the same as the primary TO then it appears in uppercase after the primary TO in Title case.
Occurrences for the same primary function all have the same colour.
Example TO names:
1. _INTERFACE
1. _JOB
2. JOB
2. JOB_Search
3. Job_LOCATION
Sample Table Occurance Groups (TOG):


SCRIPTS
If a script is for a functional area it will have a three letter prefix - usually the first three letters of the area name - this will also be displayed in the heading.
Example script names:
----------------------------------- LOCATION - LOC
LOC_New_Location
LOC_Goto_Location_List
OBJECTS
Object Naming for tabbed interface objects:
When naming tabbed interface objects you should follow a logical number sequence.
Example object names:
Tab_01
Tab_01_Sub_01
CUSTOM FUNCTIONS
Custom Functions should be named in the singlar with underscrores used in place of spaces in words.
Example for custom functions:
Record_Count
WindowNumber - Grabs the number of the currently active window if window naming follows Linear Blue standards
Standard Shortcuts:
SP = Get( ScriptParameter )
SPR( x ) = Get( ScriptParameter ) Repetition
Button = Get( LastMessageChoice )
Error = Get( LastError )
|