What’s new in 4D v16 R5

Retrieve what was new in previous R-releases >

Security

enhanced Security For 4D Server

4D supports Transport Layer Security (TLS v1.0, TLS v1.1, and TLS v1.2) to enable encrypted communications between clients and servers. Starting with 4D v16 R5 the default minimum supported version is TLS v1.2, older versions will be rejected as they could be insecure. To increase your 4D Server’s security, just upgrade to 4D v16 R5. No modification is needed for your web pages and methods, same goes for your client-server applications.

But if you want to support older browsers (or tools) that don’t support TLS v1.2, you can decrease the security level with the new Min TLS version selector for the Get database parameter and SET DATABASE PARAMETER commands.

Generate Digest command and SHA-2 support

The digest functions are handy when it comes to data integrity checks during data exchanges or comparisons. The Generate digest command has been enhanced to support SHA-2. It supports two new algorithms of the SHA-2 family: SHA-256 and SHA-512. The syntax remains the same, but now includes two new constants: SHA256 digest and SHA512 digest.

Hash and password verification for web user login

The hashing mechanism is an ideal way to store passwords. Two new commands have been created to generate and verify hashed passwords: Generate password hash and Verify password hash. Both are based on the bcrypt algorithm, which is slow by design. Thus, brute force attacks are slower and impacts are minimized.

More commands for preemptive processes

Running your methods in preemptive processes means that your applications are faster and can support more connected users. With 4D v16 R5, more than twenty existing commands have been enriched so they can be used in preemptive processes. Keep in mind that, by default, project methods are executed in cooperative mode. Therefore, if you want to switch to a preemptive mode you need to check the Execution mode property’s option “can be run in preemptive mode” in the method properties. 

 

json pointers management

JSON pointers are useful for structuring your JSON documents by splitting them into smaller, reusable parts.

4D now supports JSON pointers with the new JSON resolve pointers command. It analyzes the JSON pointers found in the object passed as parameter, then returns an object with: the success status, the result value and a potential list of errors.

Undefined value Handling

The use of undefined properties and values with Object Notation is simplified because 4D language now accepts undefined values anywhere in an expression. And, whenever you assign an undefined value to a variable, it will be set to a default value according to its type. This means that reading the property of a non-existing object won’t generate errors or stop code execution.

Pass data between forms

Now you can bind an object to a form and use it internally with the new Form command vs. using global variables when data doesn’t come from the database. All you need to do is pass parameters in an object to a form using the DIALOG command. Any property of this object will then be available from within the form via the Form command. The same thing can be done for subform areas. 

help tips on list boxes

With 4D v16 R5, two commands have been enhanced to display help tips on list box cells. First, OBJECT SET HELP TIP has been expanded to support list boxes. And second, the LISTBOX GET CELL POSITION command now supports two new optional parameters (x and y position, in pixels) and returns the corresponding column and row numbers.

4D Write Pro

Manage headers and footers programmatically

With a new set of commands, 4D Write Pro headers and footers can be managed programmatically to create other documents based on a template. These commands are divided into two categories:

  • Commands to get references of any header, footer or body inside documents, which can be used to get associated ranges, create documents for a specific section. These commands are: WP Get header, WP Get body and WP Get footer.
  • Commands to move the cursor to a specific position: WP Get frame is used to get a reference to the frame where the cursor is currently located, while WP SET FRAME sets the cursor into a specific frame. 

Support of picture expressions

4D Write Pro now supports picture expressions. Starting with 4D v16 R5, the ST INSERT EXPRESSION command has been expanded to support any expression returning an image. An expression can be a 4D variable, field, function, or a user-defined method.

Keep in mind that before using a 4D method in an expression, you first need to enable the usage of this method using the command SET ALLOWED METHODS.  

Full size background pictures

Creating background pictures filling the whole page is now possible with 4D Write Pro, thanks to a newly-added background style attribute for image clipping and origin. The advantage is that images can now be clipped to the paper and not just to the border, padding or content.

This attribute can be controlled via:

  • 4D language: You can use the WP SET ATTRIBUTES command and set the new wk paper box value for background picture clipping and/or origin.
  • Standard actions: The INVOKE ACTION command can be used, or in design mode as any other standard action.
  • 4D Write Pro widget: When selecting the “background picture” and “document” items, the clip and origin options will have a new paper box option available.

 

 

4D view Pro: automatic row height

4D View Pro already supports variable row heights in array-based list boxes. 4D v16 R5 now supports fully automatic row height, meaning that a list box adapts the height of each row to its content so the full text or picture can be displayed avoiding all kind of wrapping issues.

Three new properties are available in the Property List: Automatic Row Height, Min Row Height and Max Row Height. These settings allow developers to define whether a list box uses the automatic row height mode, in addition to the minimum and maximum row height allowed.

These settings can also be managed programmatically using the LISTBOX SET PROPERTY command and the new command LISTBOX SET AUTO ROW HEIGHT.

custom server administration DIALOG

detailed information about 4D web server

The new WEB Get server info command retrieves detailed information about your 4D Web server. This command has an optional input parameter, withCacheInfo, which is useful if the web server cache information is needed. This attribute is set to “False” by default.

 

get process activity command enhancement

The Get process activity command has been improved to make parsing the results easier. In addition, a new systemID attribute is included to uniquely identify any process: user, 4D, and spare.

Want to know more? Read all blog posts about 4D v16 R5!