BDL 4.00 new features

Features added in 4.00 releases of the Genero Business Development Language.

Important:

This version of Genero BDL is desupported, use a more recent version of the product.

Important:

This page covers only those new features introduced with the Genero BDL version specified in the page title. Check prior new features pages if you migrate from an earlier version. Make sure to also read the upgrade guide corresponding to this Genero version.

Corresponding upgrade guide: BDL 4.00 upgrade guide.

Previous new features guide: BDL 3.20 new features.

Table 1. Core language
Overview Reference
The Reflection API, to introspect and modify variables dynamically. See Reflection and The reflect package.
Packages, to group modules for better source code organization. See Modules and packages, PACKAGE, IMPORT FGL.
Mixing definitions of functions, types, constants and variables in a module. See Mixed definitions.
Variable definitions in code blocks, with the VAR keyword. See the VAR instruction.
Record usage enhancements (passing and returning records to/from functions, records in expressions) See Record usage enhancements.
Functions returns can directly be chained with a method call. See Method chaining enhancements.
Character string pattern matching and substring replacement, using regular expressions. See The util.Regexp class.
New regex-based methods for the STRING data type. See STRING.matches, STRING.replaceAll, STRING.replaceFirst, STRING.split.
The IN() operator can be used to compare an expression to a list of values. See The IN() operator.
LET statement supports compound assignment operators. See LET statement.
Initializer literals for DICTIONARY variable definitions. See Initializing DICTIONARY variables, DEFINE.
In static SQL statements, program variables can be marked with a $ dollar sign to distinguish from database object names. See Using the $ prefix for host variables.
Raw string literals using backquotes as delimiters: `abc` See Text literals.
Related upgrade notes
Table 2. User interface
Overview Reference
Universal Rendering for all front-ends. See Universal Rendering as standard.
Support for responsive layout, with extended form definition file attributes. See Responsive Layout.
New ui.Dialog.getEventDescription() method to get detailed information about the last event that has occurred. See ui.Dialog.getEventDescription.
New "ON SORT" event for dynamic dialogs. See Handling rowset sorting.
ROWBOUND action attribute can be used with all front-ends. See ROWBOUND action attribute, Actions bound to the current row.
STRETCH=NONE or STRETCH=X attribute for BUTTON, BUTTONEDIT, CHECKBOX, COMBOBOX, DATEEDIT, DATETIMEEDIT, EDIT, LABEL, PROGRESSBAR, RADIOGROUP, SLIDER, SPINEDIT, TIMEEDIT, as well as for LAYOUT. The attribute can be combined with @screen-size specifier, to implement a responsive form. See Horizontal stretching, STRETCH attribute.
The HBOX/VBOX SPLIT attribute splits an horizontal box into items that display one at the time. Applies only when the box orientation is horizontal. See SPLIT attribute
HBOX, VBOX defined with SPLIT (when orientation is horizontal), and FOLDER containers get new style attributes to show navitation widgets (navigationArrows, navigationDots). See Folder style attributes, HBox style attributes, VBox style attributes, Horizontal box splitting.
The NOSWIPE attribute prevents swipe gesture on touchscreens, for HBOX, VBOX and FOLDER elements where is it defined. See NOSWIPE attribute.
TABLE and TREE containers can define stretchable columns with STRETCHCOLUMNS, or with individual STRETCH=X column attributes. See TABLE and TREE stretchable columns, STRETCHCOLUMNS attribute, STRETCHMIN attribute, STRETCHMAX attribute.
TABLE containers can be flip columns into rows with the FLIPPED attribute. See FLIPPED attribute.
The showGrid style attribute for table/tree accepts new values to distinguish vertical and horizontal lines. See New Table.showGrid style attribute.
The alternateRows style attribute for table/tree defines when odd/even rows get a background color. See New Table.alternateRows style attribute.
The rowHover style attribute for table/tree controls row highlighting, when the mouse hovers over a row. See New Table.rowHover style attribute.
The toolbarPosition style attribute for windows supports now the "bottom" option. See Changes with Window.toolbarPosition style attribute.
Toolbar style attributes aspect, itemsAlignment and size, to arrange toolbar items. See New Toolbar style attributes.
New ui.Dialog.setDialogAttribute() method to configure a dynamic dialog. See ui.Dialog.setDialogAttribute.
New ui.Dialog.setActionAttribute() method to configure actions in a dynamic dialog. See ui.Dialog.setActionAttribute.
AUTOHIDE attribute for Toolbar ITEM and TopMenu COMMAND. See AUTOHIDE attribute.
New FGLGALLERY_TYPE_SLIDESHOW display type for fglgallery. See fglgallery.display().
AUTOCOMMANDS element for topmenu definitions. See TOPMENU section.
AUTOITEMS element for toolbar definitions. See TOOLBAR section.
New desktopMultiWindow style attribute for UserInterface. See New UserInterface.desktopMultiWindow style attribute, Containers for program windows
New applicationListVisible style attribute for UserInterface. See New UserInterface.applicationListVisible style attribute, Containers for program windows.
New windowListVisible style attribute for UserInterface. See New UserInterface.windowListVisible style attribute, Containers for program windows.
Related upgrade notes
Upgrade notes for presentation style. See Presentation styles changes.
Upgrade notes for front calls. See Front calls changes.
Table 3. SQL databases:
Overview Reference
PostgreSQL 13 and 14. See Database drivers changes.
Oracle® 21c. See Database drivers changes.
Embedded SQLite is now version 3.27.2. See Database drivers changes.
Improved support for INTERVAL types with Oracle DB. See ORACLE INTERVAL types.
Support for UTF-8 database collations in SQL Server CHAR/VARCHAR columns. See SQL Server UTF-8 support.
Better SERIAL/BIGSERIAL emulation with PostgreSQL, using a RETURNING clause after INSERT statements. Native emulation now supports start values. See SERIAL and BIGSERIAL data types.
Converting CHAR/VARCHAR/TEXT SQL type names to SAP HANA® NVARCHAR/NCLOB with FGLPROFILE entry dbi.database.dsname.ifxemul.nationalchars. See SAP HANA character string types.
base.SqlHandle gets a new method setParameterType(), to pre-define the type of the parameter. See base.SqlHandle.setParameterType.
Related upgrade notes
Upgrade notes for database drivers. See Database drivers changes.
Table 5. Tools
Overview Reference
fglcomp compiler option --mark-host-variables, to mark with a $ dollar sign all program variables in static SQL statements. See fglcomp options, Using the $ prefix for host variables.
fglcomp compiler option -W colname, to detect invalid column names in static SQL statements. See fglcomp warning options, Using the $ prefix for host variables.
fglcomp compiler option --fix-case, to make symbols match exactly the name used in their definition. See fglcomp options, Make symbols case match definition.
fglcomp compiler option -W case, to detect symbol names that do not match their definition exactly. See fglcomp warning options, Make symbols case match definition.
Better code completion for static SQL statements (column names, program variables when using $ prefix) See Complete column and variable names in static SQL.
fglcomp compiler option --output-dir, to specify the destination directory for .42m pcode module files. See fglcomp --output-dir, Output directory for .42m pcode files.
GUI log events, to add a markers in the FE protocol log. See GUI log events.
fglcomp accepts multiple @argfile files. See fglcomp, Providing the source files in an arguments file.
fglform accepts multiple .per source files, @argfile, and the --output-dir, --verbose and --make options. See fglform, Compiling form specification files (.per).
fglcomp warning -W unqualified-imports, to show a warning for symbols that are not qualifier with a module name. See fglcomp, Qualifying imported symbols.
Related upgrade notes
Table 6. Web Services
Overview Reference
All HTTP verbs (including HEAD, OPTIONS, TRACE and PATCH) supported by the OpenAPI specification are supported by the high-level REST framework. See HTTP operation attributes (Verbs).
More HTTP verbs are supported. The OPTIONS, TRACE, and PATCH verbs are supported on client and server request methods. See com.HttpRequest methods, com.HttpServiceRequest methods and com.WebServiceEngine.HandleRequest .
There is an option to omit the request body with POST, PUT, and PATCH verbs in REST service. The WSOptional attribute supports this feature. The fglrestful tool generates the specification and functions that support the feature. See WSOptional and Set a request body
The fglrestful tool generates a new wsError RECORD in the stub file. This provides details (error code and description) of unexpected errors returned by the Genero Web Server. See Handle GWS REST server errors.
The default REST media type for records and arrays is application/json. This can be set to default to XML or JSON on the Web service engine. See Set data format with WSMedia
The GWS supports two methods to publish REST services: one to publish a single web service (RegisterRestService), and one to publish resources (RegisterRestResources). This allows grouping of several resources in one REST service. See Publish a REST service
The REST Web service engine RegisterRestResources method registers resources for a service. See com.WebServiceEngine.RegisterRestResources
There is an enhancement to how Genero BDL types are handled in the REST Web service OpenAPI documentation. Instead of an anonymous type, a named type, which can be reused in several resources, is defined via JSON reference ($ref) pointing to a schema where the object's properties are exposed. See Generate service description on demand
For REST Web services using the high-level REST framework, the WSHeader attribute supports complex types such as records and arrays as specified in OpenAPI specification. See WSHeader
The xml.StaxReader class provides a method for processing the number of bytes read by the StaxReader from an XML document. See xml.StaxReader.getBytesRead.
The com.HttpRequest class provides a method for enabling and disabling sending content in chunks in the request body. See com.HttpRequest.setBodyChunk().
The HTTP status codes returned by com.HttpServiceRequest methods are no longer limited to the HTTP standard. Accepted values ​​are now allowed between 100 and 999; to include WebDAV and other RFC codes. See com.HttpServiceRequest.sendResponse.
The fglwsdl tool generates one stub file for SOAP Web service. Modular types and variables are defined as PUBLIC in the stub. This enhancement replaces the globals file (.inc), which is still supported with the -legacy option. See fglwsdl
The fglwsdl -domHandler tool command that generates callbacks has a requirement for a module parameter that must contain the callback handler functions. The -legacy option can override this where legacy files (.inc and .4gl) are needed instead. See:
The fglwsdl -s option that generates the stub has enhancements for a module parameter that must contain all the SOAP server operations. The -legacy option can override this where legacy files (.inc and .4gl) are needed instead. See fglwsdl
GWS is enhanced to support the VARCHAR(N), DECIMAL(P,S), and DATETIME types. The GWS generates precisely in the client stub and in the OpenAPI specification (JSON format) by using JSON schema restriction keywords. See Data type conversion
A new REST API versioning feature is introduced that allows you to manage multiple versions of your REST Web service with minimal coding. See Advanced REST API versioning
REST API versioning is implemented in GWS. To activate this mode, you must use the attribute WSVersion on an operation or on the Web service information record (specified with WSInfo). See WSVersion (module) and WSVersion (function)
A versioned Web service resources are accessed by default in the URI by preceding the path with the name of the version set in WSVersion. The attribute WSVersionMode is introduced to specify other options; including the resource URI (default), in a query string, or in a header. See WSVersionMode
The fglrestful tool has updates for working with versioning in generating an OpenAPI documentation file and generating the client stub for a version of a REST Web service. See fglrestful

The WSContext mechanism for setting the Content-Type header is enhanced for a multipart response to transfer data of different MIME types in the same message.

See WSContext
Related upgrade notes
Upgrade notes for web services. See Web Services changes