Welcome to the AppGEN Help Menu


Contents
Overview of the AppGEN Development System
The DEFGEN utility
The APPGEN compiler
The DBF2SQL utility
Introduction to DEFGEN Data Structures
AppGEN Language Reference
Index















The AppGEN Encyclopedia

Overview of the AppGEN Development System



AppGEN is a high level fourth generation language and application generator for producing World Wide Web (WWW) based applications. These applications are typically used over the internet or within a corporate intranet. AppGEN applications are implemented as C scripts conforming to the Common Gateway Interface (CGI) standard supported by most Web Servers.

To use AppGEN you will need the following :-
  • Postgres 95, relational database management system
  • A CGI compatible web server such as NCSA's HTTPD
  • An ansi C compiler such as GCC


  • Applications can be generated automatically from a logical data structure describing the format and relationships of a database. The
    DEFGEN utility generates a basic template application which can add, browse, update and delete records from the database. The resultant AppGEN source code can then be embellished to produce a more sophisticated application. This approach allows a prototype to produced very quickly but without impeding flexibilty.

    The APPGEN utility compiles AppGEN source code to produce a series of ANSI C files and HTML documents which will make up the finished application. Since these are ordinary C files, they can be linked to any local libraries to provide whatever additional functionality the programmer requires.
    The AppGEN Encyclopedia

    AppGEN Compiler



    Purpose
    Compiles AppGEN source code into C and HTML documents.

    Usage: appgen filename.app

    What it does
    The appgen utility reads in the file specified on the command line and generates a series of html documents and C source code files. For each
    menu defined in the source file, a html document will be produced and for each module, a C file will be generated. In addition the compiler creates a makefile with which to compile the resultant files. All these files are placed in the directory specified by the src-dir parameter within the global section of the application file.
    After executing appgen, if no errors are reported, change to the src-dir directory and do a make to build the finished application.

    Where it can be used
    Appgen is executed from the Unix command line.

    Example
    appgen pim.app

    See also
    defgen dbf2sql AppGEN Language Reference


    The AppGEN Encyclopedia

    DEFGEN Utility



    Purpose
    Generates a primitive application from a logical data structure.

    Usage: defgen filename.def

    What it does
    The defgen utility reads in the file specified on the command line and generates an AppGEN source code file based on the data structure. The primitive application will allow records to be added, updated, deleted and searched upon. Defgen is intended to be a tool to allow a prototype to be rapidly developed rather than for producing finished applications.
    The
    appgen compiler should be used to compile the source code.

    Where it can be used
    Defgen is executed from the Unix command line.

    Example
    defgen pam.def

    See also
    appgen dbf2sql defgen definitions


    The AppGEN Encyclopedia

    DBF2SQL Utility



    Purpose
    Converts DBase III compatible .dbf files into SQL scripts.

    Usage: dbf2sql filename.dbf

    What it does
    Dbf2sql reads the specified .dbf file and outputs an SQL equivalent to the standard output. The resultant SQL script will consist of a single CREATE TABLE clause and multiple INSERT clauses (one for each record in the .dbf file). The resultant SQL script may need editing prior to use, this will be the case if any of the original fieldnames are SQL reserved words. Care should also be exercised if you are using a .dbf file generated from a package other than DBase, this is because the dbf file structure only allows fieldnames to be 10 characters long. If fieldnames are truncated then duplicate names may result.

    Where it can be used
    Dbf2sql is executed from the Unix command line.

    Example
    dbf2sql invoice.dbf | psql mydb

    See also
    appgen defgen


    The AppGEN Encyclopedia

    DEFGEN Data Structures



    In order for DEFGEN to generate an application, it needs to know the structure and relationships of files within the database. The following defines the format recognised by defgen.
    The first section is a series of variables which correspond to the settings in the [GLOBAL] section of an appgen application

    AppGEN Language Reference



    The AppGEN 4GL exists as a heirarchy of functions :-

    [GLOBAL]
    [MENU][MODULE]
    [FORM][PROCESS][OUTPUT]

    This heirarchy represents a complete application, which consists of one GLOBAL section, multiple MENU's, and multiple MODULE's each consisting of multiple FORM's, PROCESS's and OUTPUT's. At compile time MENU sections are translated into .html documents and MODULE sections are compiled into executable CGI scripts. The GLOBAL section is used to tell the compiler about the specific setup of the target host machine.










    The AppGEN Encyclopedia

    GLOBAL section



    Purpose
    To initiate the global section.

    Usage: [GLOBAL]

    What it does
    It starts a global section within the application file which informs the compiler of important compile time parameters. There should be only one global section within each application file.

    Where it can be used
    Ideally it should be placed at the top of the application file but it is also a good idea to
    include it from a separate file, this improves the portability of application files.

    Example
    [GLOBAL]
    SET pgdir AS "/usr/local/postgres95"
    SET pghost AS "localhost"
    SET pgdatabase AS "root"
    SET httpd-dir AS "/usr/local/httpd"
    SET cgi-url AS "http://localhost/apps"
    SET doc-url AS "http://localhost/docs"
    SET src-dir AS "/tmp"

    See also
    SET Parameters [MODULE] [MENU]


    The AppGEN Encyclopedia

    MENU section



    Purpose
    To create a menu within the application.

    Usage: [MENU menu_name]

    What it does
    It starts a menu section within the application. This will create a separate html document at compile time.

    Where it can be used
    Anywhere within the application file but its use will terminate the previous section. MENU sections cannot be nested within MENU's or MODULE's.

    Example
    [MENU main]
    SET title AS "The Main Menu"
    DEFINE MENU {
    "Data Entry Form" : MODULE "main_form"
    "Reports Menu" : MENU "reports"
    }

    See also
    SET Parameters DEFINE MENU [MODULE] [GLOBAL]


    The AppGEN Encyclopedia

    MODULE section



    Purpose
    To create a module within the application.

    Usage: [MODULE module_name]

    What it does
    It starts a module section within the application. This will create a separate CGI script file in C at compile time. Modules consist of component FORM's, PROCESS's and OUTPUT's.

    Where it can be used
    Anywhere within the application file but its use will terminate the previous section. For this reason MODULE sections cannot be nested within other MENU or MODULE sections.

    Example
    [MODULE main]
    SET default_process AS "entry"
    STRING global_variable
    [FORM form_1]
    .....
    .....
    [PROCESS entry]
    .....
    .....
    [OUTPUT report_1]
    .....
    .....

    See also
    SET Parameters Variables [FORM] [PROCESS] [OUPUT] [MENU] [GLOBAL]


    The AppGEN Encyclopedia

    Index













    The AppGEN Encyclopedia