Understanding what gets generated
4gl files are generated for each diagram entity.
When a generated program is built, the generated 4gl files are compiled and linked with the other program files to create the executable application. The compiled binary versions are stored in the project's /bin directory.
The generated 4gl and XML files for each
diagram entity are shown in the Intermediate Files folders in the
project. This figure shows two generated files for the Program
entity, Account.4prg.
Note: The XML file
listed in the Intermediate Files folder are temporary files
that consolidate all data from diagrams and are used to generate the
4gl code. They are not places to customize code, but can be
useful to a template developer as these XML files are used as
input to the code that is generated. See How code is generated.
The default template set is designed to generate organized and functional code for a data-driven business application. See The default template features.
Each generated 4gl file has many functions. Each function has
specific places called POINTs and
BLOCKs where you can add your own code. Code Files and Code Link Properties can
be used to directly access generated files and specific POINT
s.
File | Description |
---|---|
Program.4gl | This file contains the MAIN function. It defines
global variables, connects to the data source with the CONNECT TO statement, loads
styles and action defaults files, and performs some initialization tasks for the application. |
File | Description |
---|---|
Schema_dbxdata.4gl | This file manages the database SELECT ,
INSERT , UPDATE , and DELETE
statements. |
Schema_dbxconstraints.4gl | This file manages table and column constraints. |
File | Description |
---|---|
Form_ui.4gl | This file contains functions called from MAIN . It
opens the form based on the open mode, loads the Toolbar and Topmenu, launches functions to manage
application states, calls MENU or DIALOG statements for the
various states and calls functions in the Form_uidialog.4gl
to retrieve and manage subdialogs. |
Form_uidialog.4gl | This file defines the subdialogs and modular variables. It manages the states of actions, fields and subdialog and calls functions in the Form_uidialogdata.4gl. |
Form_uidialogdata.4gl | This file defines the modular variables, manages UI data (clear, fetch, set default values), and calls functions in the Form_uidata.4gl. |
Form_uidata.4gl | This file includes functions to retrieve and manage the database data.
It defines the records for the database columns and tables, creates and fills a dynamic row of data,
creates and fills a dynamic row of record keys,contains the SQL statements to
SELECT , UPDATE , and DELETE rows in the database,
and handles the SQL transactions. |
Important: Reports and Web Services are not supported on mobile platforms.
File | Description |
---|---|
Report_report.4gl | This file contains the report driver for the report. |
Report_reportdata.4gl | This file contains the SQL and BDL statements to fetch the report data. |
reportdata_report.rdd | This file is a data file is generated for use when the developer creates the report definition file (4rp). |
File | Description |
---|---|
WebService_service.4gl | This file handles business record type definition (only take public fields), defines the module variables (input and output variable for service's CRUD operations), and sets up the service and publishes the CRUD operations. |
WebService_serviceclient.4gl | This file is the Client API of a JSON Web Service. It contains a set of function wrappers which allow communication with a JSON Web Server. |
WebService_uidata.4gl | This file handles business record type definition, contains operations to insert / update / delete rows in the database, contains ascending lookup management. |
WebServiceServer_server.4gl | This file contains the MAIN function, sets up
the web service engine, contains the CONNECT TO BDL
statement, registers services, and listens for incoming
requests. |
WebService.xml | The XML file contains the information about the web service needed to generate the logic in the 4gl files. |
WebServiceServer.xml | This file contains the information about the Webservice Server needed to generate the logic in the 4gl files. |
File | Description |
---|---|
libdbappCore.4gl | This file includes common functions for managing errors and strings. |
libdbappExt.4gl | This file includes common functions for managing the interaction with mobile device peripherals. See Add mobile device features (Photo, Gallery, Phone, Mail, SMS, Contact, Maps, Barcode) |
libdbappFormUI.4gl | This file includes common functions related to form transitions and states. |
libdbappSQL.4gl | This file includes common functions related to SQL transactions, errors, and database statements. |
libdbappUI.4gl | This file includes common functions related to the user interface such as Topmenus, Toolbars, and front end type. |