Progress
Programming
Handbook


Consistency

The Progress 4GL supports all front-end, back-end, and distributed application logic with a single block-structured language that includes the following features:

Consistent Data Model

The 4GL presents a consistent model for external (database) and internal (memory) data management. That is, you can work with both database fields and variables using similar data manipulation and user interface techniques. Progress also protects variables and database fields at run time using similar update and data consistency mechanisms (transactions). Progress transactions also support multi-user database access with the help of a flexible lock manager. For information on how Progress manages variable and field values in the user interface, see Representing Data." For information on how Progress manages database records and program variables in transactions, see Transactions." For information on the 4GL elements you can use to coordinate multi-user database transactions, see Locks."

The 4GL supports implicit access to database records and fields using record-reading blocks (including the FOR statement described earlier). You can also read database records and fields explicitly using record-reading statements that access either single or multiple records (queries) at a time. This includes B-tree indexing and support for joins within a single database or between the tables of multiple databases. For information on Progress 4GL mechanisms for accessing databases, see Database Access."

Progress also uses the same data model (with appropriate variations) to access non-Progress databases and file systems with DataServers. For more information on the 4GL variations required to access DataServers, see the Progress DataServer guide for each DataServer.

The 4GL also supports memory-resident temporary tables. You define temporary tables much like groups of variables. They are, in fact, variables grouped into memory-resident database records. Thus with temporary tables, Progress allows you to define arrays of records and access them with the same 4GL interface used to access database records. For information on how to use these memory-resident tables, see Work Tables and Temporary Tables."

Single-User Interface Model

The 4GL uses a single internal model (with some variations) for both graphical and character user interfaces. This model represents the user interface as related hierarchies of widgets, where a widget is any single user interface object that you can define completely in the 4GL.

This single widget model supports several different visualizations, depending on the operating environment. In graphical environments, like Windows, widgets are 4GL-aware controls that include such objects as windows, frames, selection lists, fill-ins, and database browse widgets. In character-environments, the 4GL supports many of the same widgets in character form. See "Using the Browse Widget," and most of the remaining chapters starting with "Widgets and Handles," for information on using 4GL widgets.

Encapsulation

Using basic external and internal procedure blocks, Progress provides an encapsulation mechanism that allows you to create 4GL-based objects. That is, you can package data, widgets, and code into a single unit that your application can access through a controlled interface, much like encapsulated object modules in C and some other languages.

You create and manage encapsulated objects at run-time by executing external procedure files persistently. See "Block Properties," for information on external and internal procedures, persistent procedures, and user-defined functions. See also "Windows," which shows one way you can use persistent procedures to manage a user interface.

An ADE application-building tool, the AppBuilder, includes an implementation of encapsulated objects, Progress SmartObjects. These include a variety of objects that you can combine to build many types of database applications using the current version of the Progress Application Development Model (ADM). For more information, see the Progress AppBuilder Developer’s Guide.

Common Event Handler

The 4GL language provides a common event handler for both user interface and database events, which are programmable using triggers. This event handler allows your application to manage all supported graphical and character user interfaces using similar trigger routines. The same mechanism helps to streamline the coding of data integrity rules by trapping various database read and write events. For information on how to use database triggers, see Database Triggers." See also "Handling User Input," and "Widgets and Handles," for information on how to work with user interface triggers.

Choice Of Programming Models

With block control structures and event triggers, you can choose from a range of program models to implement your applications, from purely procedure-driven to purely event-driven. See "Programming Models," which compares the two basic procedure-driven and event-driven program models, and how they can be used in the 4GL. See "Block Properties," for information on the basic block control structures of the 4GL.

Integrated Preprocessor

The Progress 4GL requires no preprocessing steps separate from compilation for any aspect of 4GL application development. However, there is an integrated 4GL preprocessor for conditional compilation to help your application adapt to varying environmental requirements. For information on this facility, see The Preprocessor."

Default Processing

A rich set of overridable defaults allows your applications to be as simple or as complex as user requirements demand. These defaults allow you to develop useful applications with as little as one line of code, or as many lines as you need to manage complex user interfaces and multi-user database queries and transactions. This includes default error-handling capabilities available from the statement to the application level. For information on the error-handling facility and its defaults, see Condition Handling and Messages." Other defaults are described as they apply to each 4GL feature.

Integrated Application Help

The 4GL provides access to a variety of application help facilities, depending on your application’s user interface. For applications running in a graphical user interface (GUI), you can build a complete hypertext on-line help system using the Progress Help compiler. Through the 4GL, you can also provide context-sensitive access to this help system.

For applications running in any user interface (character or GUI), you can provide field-level help. Field-level help automatically prompts the user when they give input focus to a field. You can specify the prompt (or help string) for each database field directly in the Progress Data Dictionary or using 4GL help strings.

For more information on both on-line help and field-level help, see the Progress Help Development Guide.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095