# CHAPTER 3: Empress 4GL Development Tools

Empress 4GL provides a set of tools to help you develop applications effectively. A brief description of each of these tools can be found in this chapter. Detailed information on how to use these tools are in the Empress 4GL: Tools Reference manual.

The Empress 4GL development consists of the following:

- Default Application Generator
- Application Generator
- Application Manager
- Application Editor
- Form Editor
- Form Manager
- Source Debugger
- Executable Builder
- Compiler and Linker

## 3.1 Default Application Generator

The Default Application Generator creates an interactive, window-based application on one table which allows the user to perform select, insert, update or delete operations by pressing a function key.

The Default Application Generator does not involve programming. Once the table and application names are provided, it will create the application based on the table definitions in the data dictionary. It is often used for quick prototyping. Since the application generated by the Default Application Generator is an Empress 4GL application, you can use the Application Editor to modify the application.

The Default Application Generator can be found on Menu 2 of the Application Manager.

## 3.2 Application Generator

The Application Generator creates an interactive menu-driven application on one or more tables which allows the user to perform select, insert, update or delete operations on the data in the Empress 4GL database.

The Application Generator does not involve programming. When using Empress 4GL to create an application, you will go through a series of menu pages to pick and choose:

- the desired screen layout
- the tables and attributes that are involved in this application
- the function keys that are available to the user
- the qualification of the records
- build custom help information

It is often used for simple applications or for quick prototyping.

Since the application that is generated from the Application Generator is an Empress 4GL application, you can invoke the Application Editor to modify the application.

The Application Generator is invoked through the Application Development `Main` Menu.

## 3.3 Application Manager

The Application Manager allows you to create new applications and edit, copy, delete and rename the existing applications. Through the Application Manager, you may also invoke the Default Application Generator, Source Debugger, compile, link and run the application.

The Application Manager is used more frequently during the development phase. Quite often, during the development phase, there will be a requirement to modify a particular form, the Application Manager allows you to escape to the Form Manager without exiting the Application Manager.

The Application Manager is invoked through the Application Development `Main` Menu.

Figure 3-1 4GL Application Development System

## 3.4 Form Manager

The Form Manager allows you to create new forms and edit, copy, rename and delete existing forms. Forms are painted using the Form Editor.

The Form Manager is invoked through the Application Development `Main` Menu.

The Form Manager is used frequently during the design and development phase of the application. Forms can be created long before the actual development starts.

## 3.5 Source Debugger

The Source Debugger is an Empress 4GL tool which is used to determine where and why runtime errors are occurring. It is menu driven and uses windows to display information which allow you to look at different parts of the application which is being debugged.

The Source Debugger is used when the application is not functioning the way it is intended. It allows the execution of a program to be stopped and examined at various times. This allows you to determine where variables are being set to the wrong values or the wrong branch of code is executed.

The Source Debugger is accessed through the Application Manager.

## 3.6 Application Editor

The Application Editor is a built-in editor that allows you to edit the scripts which make up an application. You will be using the Application Editor to modify existing scripts and write scripts of your own.

The format of the Application Editor reflects the structure of applications, allowing you to write:

- Application scripts
- Window definitions
- Field scripts
- Key scripts
- Subscripts
- Domain definitions

Scripts are stored in Empress 4GL system tables, so the Application Editor includes a menu allowing you to choose the table you wish to edit. The window for editing the application enter and exit scripts is labeled the "Application Table", the window for editing key scripts is labeled the "Key Table", and so on. This menu is called the `Tables` Menu.

The Application Editor allows you to select scripts, modify them, and update the tables. You can also write original scripts and insert them into the tables, and delete scripts that are obsolete.

Figure 3-2 4GL Application Development System

## 3.7 Form Editor

The Form Manager provides you with the Form Editor. The Form Editor is a full-screen editor that allows you to create, design and modify forms. It simulates a blank sheet on which you can paint a form exactly the way you want it to appear in your application. Editing a form consists of:

- typing in background text
- painting lines and boxes
- creating and naming fields

You can also modify a form by repainting parts of it, and adding, moving or removing fields.

## 3.8 Executable Builder

The Empress 4GL Executable Builder allows the user to build customized executables which consist of zero or more terminal definitions and zero or more linked applications compiled as read only runtime executables. The Empress 4GL Executable Builder is invoked at the operating system level by typing:

    emp4bldx

## 3.9 Compiler and Linker

Compiling builds a library for an application; linking builds an executable application by linking libraries together. All applications must be compiled and linked before they are run.

When an application (or library) is compiled, it is checked for syntax errors, valid window sizes and undefined variables. When an application is linked, all references to window names, script names, external variables and other items are resolved.

Compiling and linking is done through the Application Manager or the Application Editor.