Print this Page
How Does It Work
Architecture Policy
Close this Page

4.5.04 Architecture Policy:
The "Single Index Application Program Stack" is of fundamental importance in providing demonstrable security - it cannot get more secure than one program.
No matter what function needs to be scheduled, it must be done via INDEX.C2 - no other program name will ever be exposed in HTML.
Even a diary that is just updating its own date will be executed via INDEX.C2 with applicable URL encoded parameters that cause the date to be changed.

Popup Policy
The public web pages are just "page" functions that replace the current page and so must have a menu.
Dashboards and welcome pages and just "page" functions that replace the current page and must have a menu.
Each "popup" function is a popup web page of topics with static text that does not need a menu.
Each "search" function begins as a popup container for associated list, add, clone and change functions - complex menu navigation exists between these related function types.
Each "sheet" function is a popup web page for its shreadsheet list of contents - sheet menu will provide options to the same function.
Each "history" function is a popup web page for its shreadsheet list of contents - history search menu can only use the same function.
Each "special" function is a popup web page for its bespoke report contents - special menus can only use the same function.
Each "template" function is a popup web page for its business document contents - template menu is just to other template functions.

Field Policy
By design to make things easy to use, only 3 types of data entry field is supported:
TEXT is a text or number data entry field.
LIST is a drop down list where one value may be selected.
AREA is a large text data entry field with more than one row.
While clever radio and checkbox buttons could be supported, this would dramatically increase training costs and make applications too complex and unworkable for some people - in every case, a simple LIST drop down list has proved to be more effective.

Architecture
1. INDEX.C2 is the only level-1 program.
2. A modest set of level-2 programs will be included for normal application processing.
3. A larger set of level-3 programs will be included for bespoke report application services.
4. A vast set of level-4 4GL declarations will be used for normal application functions.
5. Template business documents are maintained in site folders with imbedded placeholders.
6. Endorsements and associated blocks of reusable HTML text are maintained in site folders.

Level-2 Include 0200 Programs
PDOS_0200_DB_FUNCTION.C2 is always included with all the basic DB functions.
PDOS_0210_DATABASE_MANAGER.C2 is included for SHOW_PAGE 4GL DB procedures.
PDOS_0220_SIGN_IN_MANAGER.C2 is included when the sign in form is submitted.
PDOS_0230_EMAIL_CONTACT.C2 is included when the contact us form is submitted.
PDOS_0240_REFERENCE_MANAGER.C2 is included for any option HTML or list decode function.
PDOS_0250_SHOW_PAGE.C2 is included for all 4GL services.
PDOS_0260_GEOGRAPHIC_MANAGER.C2 is included by signed if needed.
PDOS_0262_GEOGRAPHIC_IP.DAT is read by geographic manager.
PDOS_0290_AJAX_DB_UPDATE_FIELD.C2 is included for each AJAX field update requests.
PDOS_0291_AJAX_DB_CALC.C2 is included by AJAX for calculation updates.

Program Naming Policy
Every level-2 program is in folder pdos_0200_include.c2
Every level-3.1 program is in folder pdos_0300_special.c2
Every level-3.2 program is in folder pdos_0302_reserve.c2
Every program name is in the style pdos_nnnn_xxxx.c2 where nnnn is a number and xxxx is a subject - "pdos" and "c2" are mandated to imply PHP.

Level-3 Special 0300 Programs
More than 70 one-off bespoke programs are deployed for reporting purposes.
Each program has a dynamic program name that is included and called.
Two classes are used:
$c2_special_call is included and called by INDEX as a special function type.
$c2_reserve_call is included and called by SHOW_PAGE as a RESERVE 4GL statement.

Level-4 4GL 0400 Declaractions
More than 3000 4GL declaractions are deployed for the common types of functions.
Each 4GL has its function type built into its name.
The only functions used are:
DASH as a replacement page of static text topics and optional dynamic forms with Key Performance Indicators.
PAGE as a replacement page of static text topics.
POPUP as a popup page of static text topics.
SEARCH as a popup container for list, add, clone and change function contents.
LIST as the contents of a search.
ADD as the contents of topics with data entry fields.
CLONE as the contents of topics with data entry fields.
CHANGE as the contents of topics with data entry fields.
* VIEW as a change function where all field values are read-only.
* UPDATE as a change function where field values are updated.
SHEET as a popup spreadsheet showing many fields in many rows with date range selection.
HISTORY as a popup read-only list of field value changes.
SPECIAL as a popup web page such as a diary or management information - see level-3.1 special programs.
TEMPLATE as a popup web page showing a business document - see level-2 function-template programs.

4GL Naming Policy
Every level-4 file is in folder pdos_0400_4gl that has many app and role dependent subfolders
Every 4GL file name is in the style c2man_nnnn_xxxx.ll where nnnn is a number and xxxx is a subject - "c2man" and "ll" are mandated to imply 4GL.
nnnn is only unique within an application - 6543 may exist for the yacht and PI and motor applications, so sub-folder names are critical.