WebKit Account Structure

WebKit consists of uniVerse account information, BASIC programs, RETRIEVE and uniVerse SQL reports, and a collection of shell scripts, UNIX executables, and various HTML text and graphics files. WebKit is designed to be installed on a production system using at least two uniVerse accounts.

WebKit is delivered as a single uniVerse account with subdirectories (Type 19 files) that contain the HTML text and graphics, shell scripts, and executables. The standard setup is to install the source account, named WEBKIT, in an account that is owned by the user id of the httpd server. The server files are installed in a directory structure that looks like

The Pages directory is the server root for URLs, the bin directory is a CGI directory that contains the scripts to be executed, and the WKPROD (or whatever you name it) directory is the production WebKit accoun

The httpd server must be configured so that URLs starting with /bin are mapped to the bin directory, those starting with /WKIMAGES are mapped to the production WKPROD/WKIMAGE directory, and those starting with /WKFORMS are mapped to the production WKPROD/WKFORMS directory. Typically, the /WKFORMS pages are password protected so that only authorized users can perform the administrative tasks.

Account Setup

The production WebKit account is setup by creating a new uniVerse account in the proper place. Then run the paragraph WKPREP from the source WebKit account, specifying the production WebKit account name. WKPREP will create the necessary files and copy the necessary records into the production account. The exceptions to this are:

These actions must be done manually so that WKPREP can be run again without destroying any information local to the production account.

The bin directory

The bin directory is populated by copying the following files from the WKSCRIPTS file in either the source or production account:

The server needs to be configured so that there is an alias path for /bin/* to the production account WKPROD/WKSCRIPTS/*

Naming Conventions

All commands processed by WebKit must be authorized for execution by including them in the HTMLValidCommand record in VOCLIB in the production WebKit account. Each field in the HTMLValidCommand record is either a complete command, like DATE or LIST, or a command prefix followed by three periods, like HTML… or ACCESS…

Each applet or set of routines has a main data file and a program file that have the same prefix. All commands for that applet will start with the same prefix. For example, the main file for Customer Action Request processing applet is CAR, the program file is CAR.BP and some of the commands are CAR.OPEN.REPORT, CARWrite, etc. Names of the form APPLET.XXX.XXX are usually uniVerse paragraphs or sentences while names of the form APPLETAction are usually cataloged BASIC programs, subroutines, or functions.

Program Files

Program files contain source records with either a .B suffix (code files) or a .H suffix (include files). There is also a MAKE.MK record which is the makefile for the applet.

Makefiles are generated and maintained using the MKMAKE utility. The source for MKMAKE is in UTIL.BP/MKMAKE.B. The calling sequence for MKMAKE is

MKMAKE BPFilename SourceRecord CatalogName dependson
where:
BPFileName
is the name of the program file name whose MAKE.MK record is to be updated
SourceRecord
is the name of the new program source file
CatalogName
is the name the program or function is to be cataloged as
dependson
is a list of entities that the compiled program depends on.
For example, to create a new make object in the CAR.BP file for a program to be named CARFoo which is compiled from the source record FOO.B which contains include records CAR.H and H.H, issue the command:
MKMAKE CAR.BP FOO.B CARFoo CAR.H H.H

The standard way that make is invoked is to create a VOC entry of the form:

MAKEC:
001: S - Make command for CAR.BP file
002: SH -c "make -f CAR.BP/MAKE.MK"

The command "MAKEC ALL" would then make the out of date targets, and catalog them locally for debugging. "MAKEC GLOBALCATALOG" would globally catalog all targets so they can be seen by the production account.

Dictionary Record Equate Files

All references to uniVerse file fields in BASIC code is via EQUATEd field numbers. For each data file referenced in an applet, the program file contains a .H file that is generated using the GENEQU utility.

GENEQU BPFileName DataFileName

The source for GENEQU is in UTIL.BP/GENEQU.BP

The default make rule for a BASIC program compiles the program and catalogs the result locally. Once the program has been debugged, you must catalog it globally (normally) so that it will be used by the production account. There is a GLOBALCATALOG target defined in every MAKE.MK file that will globally catalog every program in the applet.

Operational Data Access

Normally access via WebKit to operational data or more extensive applications written specifically for Web access would be done by creating a separate application account and linking to the data files with Q pointers and globally cataloged commands. All the paragraphs and sentences associated with the application must be in the production WebKit VOC however.

Miscellaneous Files

The following are files that are defined in both the source and production accounts. The entries in the source account are templates or defaults, while the entries in the production account should be tailored to suit the customer's needs.
WKFORMS
contains the HTML segments and pages used by the administration and demo routines.
WKIMAGES
contains the inline graphics used by the administration and demo routines.
WKSCRIPTS
contains various shell scripts and binaries used by WebKit
WKCONTROL
control file used by HTMLFormGen and HTMLFormProc to generate and process forms. Each entry in the WKCONTROL file specifies the name of the uniVerse file that contains the HTML segments to be used in generating or processing the file, and a list of the components. Components can be HTML segments, an executable command that generates a portion of the HTML used to create the form, or the name of the file, record ID, and fields to be used to generate forms controls.