4GL and x4GL programming languages


What is 4GL?

There are many definitions available. "4GL" stands for "Fourth Generation Language" , and "x4GL" is a short name for all Informix-4GL (I-4GL for short) languages/compilers, such as a4GL (Aubit 4GL), D4GL (Dynamic 4GL, aka 4Js/Four J's), Q4GL (Querix 4GL), etc.

From http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?4GL :

An "application specific" language. The term was invented by Jim Martin to refer to non-procedural high level languages built around database systems. The first three generations were developed fairly quickly, but it was still frustrating, slow, and error prone to program computers, leading to the first "programming crisis", in which the amount of work that might be assigned to programmers greatly exceeded the amount of programmer time available to do it. Meanwhile, a lot of experience was gathered in certain areas, and it became clear that certain applications could be generalized by adding limited programming languages to them. Thus were born report-generator languages, which were fed a description of the data format and the report to generate and turned that into a COBOL (or other language) program which actually contained the commands to read and process the data and place the results on the page.

Here is definition of 4GL in the Wikipedia 4GL

A fourth-generation programming language (or 4GL) is a programming language designed with a specific purpose in mind such as the development of commercial business software.

Some other successful 4th-generation languages are: database query languages, e.g. SQL; Focus, Metafont, PostScript, RPG-II, S, IDL-PV/WAVE, Gauss, Mathematica and data-stream languages such as AVS, APE, Iris Explorer.

Informix-4gl and Aubit-4GL have dedicated pages in WikiPedia.

How does x4GL look like?

Informix-4GL, and therefore x4GL programming language is "English language-like" programming language, which is arguably one of its biggest strengths. General consensus is that that x4GL language is one of easiest to learn, and make programmers productive in shortest possible time. John McNally, author of Informix Unleashed book, say that "To develop with a 4gl, the developer does not have to be an expert programmer". We agree. For instance:

OPEN WINDOW MyTestWindow AT 2,3 WITH FORM FormForMyTestWindow" ATTRIBUTE( border, white )


Try to guess what this will do? Try this one:

MENU "Title for my test menu"
   COMMAND "Impress Me" "Do something to impress me" help 126
       CALL ImpressMe()
   COMMAND "Exit" "Exit this menu" help 127
       EXIT MENU
   END MENU


One of favorite power tools in x4GL is Query By Example (QBE). It uses forms to ask user for search criteria, and automatically forms SQL "where part":

CONSTRUCT BY NAME MyWherePart ON AddressTable.*


Believe it or not, that was it. If you want to learn more, see our x4gl language reference. See excellent Informix 4gl tutorial "Informix 4GL By Example" (PDF format) if you want to learn the language. If you are experienced programmer, this will probably be one of easiest languages you ever learned, and if you are just starting to write programs, this in our opinion is you best choice.

x4GL language allows for SQL commands to be embedded directly in x4GL code, and Aubit 4GL allows you to embed C language code too, creating a unique "High / Low" approach to programming. The fact is, Aubit 4GL compiler is really a "x4GL to C" programming language "translator", and actual executable programs are compiled by standard C compiler. To summarize, daily tasks related to creating database applications and reports are really easy to do, but if you need to go "deep down", you can, just as if you are programming in C.


Created by: fortiz last modification: Thursday 29 of March, 2007 [21:35:19 UTC] by fortiz

The original document is available at http://http://aubit4gl.sourceforge.net/tikitiki-index.php?page=WhatIs4GL