Stricter class-based typing for objects
With 4D 20 R10, object typing takes a major step forward, giving you more confidence and control in your code. Instead of simply checking if a value is an object, 4D now verifies that it’s an instance of a specific class. This unlocks smarter auto-completion, inline validation, and stricter compilation checks, helping you catch mistakes early and write clearer, more maintainable code.
The benefits don’t stop at variables and function results. This enhancement also applies to your data model: you can now assign a user-defined or native class (like the new 4D.Vector for your AI implementation) directly to an object field in the structure editor. 4D then understands the full shape of the object, from design time to runtime, enabling a type-safe and more reliable development experience.
ORDA – Get started with the touched event
ORDA is a core long-term feature that opens up a world of new possibilities in 4D.
We keep enhancing ORDA to help you write powerful code. As a result, your apps become easier to develop and maintain — and most importantly, they are optimized for great performance for your end users.
That’s why we’re excited to introduce a new feature in 4D 20 R10: in-memory data events.
In a typical user journey, the required data by the user is loaded into memory, modified according to user actions, and finally saved when the user clicks a Save button.
What if you could automatically trigger business logic when in-memory data changes? It’s now possible to format or prepare data as early as possible, so it’s ready to save when needed.
This is made possible by the new ORDA touched event on data — and the benefits are considerable.
Want to learn more? Keep reading!
Smarter Copy-Paste to Protect Your Data
You work across environments — test, production, staging — and you copy more than text. Sometimes it’s formulas. Sometimes it’s data that shouldn’t move as freely as your cursor does. With 4D 20 R10, paste behavior gets smarter.
Formulas copied within the same app stay intact. But across environments, only values are pasted — never the underlying logic.
ORDA – Get started with the entity constructor
The 4D language supports the concept of classes and thus, the concept of constructor.
On the another hand, the ORDA abstraction layer, through Data Model Classes, provides a great business benefit. It allows you to write business-oriented code and “publish” it just like an API. Datastore, dataclasses, entity selections, and entities are all available as class objects that can contain functions as well as computed attributes, and aliases.
This leads your apps to follow easily the MVC principles with powerful and optimized code.
To work with a complete object-oriented approach, starting from 4D 20 R10, entity classes can now have a constructor(). Need to set up initial values when a new entity is instantiated? It’s now possible! Keep reading to learn more …
Building Forms on the fly with New Data Source Commands
In application development, it is often necessary to build forms dynamically. For example, you might want to generate a search form on the fly, tailored to the user’s needs. In 4D, there are two main approaches for building dynamic forms: either constructing the entire form programmatically or adding objects to an existing form layout. For the second option, until now, it was possible to duplicate objects with OBJECT DUPLICATE, and modify the data source with OBJECT SET DATA SOURCE, all using a classic pointer-based approach.
With 4D 20 R10, new and powerful commands, OBJECT SET DATA SOURCE FORMULA and OBJECT Get data source formula, allow developers to bind a formula as the data source of form objects. Moreover, you can dynamically assign formulas to key listbox properties with the LISTBOX SET PROPERTY command such as Current item, Current item position, and Selected items.
This opens the way to a more modern, flexible and readable approach, thanks in particular to expressions such as Form.xx or the classes.
SHOWCASE: SMART COMMENT MODERATION WITH AI
Continuing our journey into intelligent features with 4D AIKit, let’s explore a highly relevant use case for any modern application: automated comment moderation. In a world where online conversations can happen in real-time, keeping your platform safe, respectful, and compliant is no longer optional, it’s essential. With AIKit, you can build powerful moderation tools directly into your application logic, without relying on external moderation services or human reviewers.
Generate, share and use web sessions One-Time Passcodes (OTP)
Today, web applications have become integral to our lives, offering convenient features that save time and simplify everyday tasks. As an example, creating accounts on various platforms is one the most frequent user action on web sites.
They expect this kind of process to be quick and accessible—whether at home, commuting, or relaxing on the beach.
Behind this simplicity lies a more complex reality. These operations often require integration with third-party systems, such as email verification services. This introduces challenges related to security, user experience continuity, and protecting against man-in-the-middle attacks.
For developers, ensuring a smooth experience means managing interactions between external systems and the 4D web session. This involves maintaining the user’s context—retrieving data, privileges, and the exact step of their journey to complete the process.
Sounds complicated? It doesn’t have to be! Discover how to build robust web applications that securely and efficiently communicate with third-party systems with 4D 20 R9.
Automatic Refresh of OEM Build Licenses
4D automatically refreshes development licenses when they reach their expiration date. However, OEM build licenses (4D Server OEM and OEM XML keys) still need human intervention to be updated. This was causing issues on automated build chains and, in general, a loss of time.
4D 20 R9 extends the automatic refresh of licenses to OEM build licenses. This blog post will describe the different scenarios in which it will happen.
New class to handle incoming TCP connections
In 4D 20 R8, we introduced the TCPConnection class, allowing you to initiate TCP connections to remote servers. With 4D v20 R9, we’re excited to bring you the TCPListener class—your key to handling incoming TCP connections and building a TCP server directly in 4D.
With these two classes—TCPConnection and TCPListener—you now have full control over TCP communication, both client- and server-side.
Let’s walk through how to use them together.
Discover your AI-powered writing assistant in 4D Write Pro
In a world where professional writing is constantly evolving, 4D Write Pro is here to revolutionize the way you write. With the integration of an AI-powered writing assistant, you now have instant support to draft, edit, and enhance your documents.
Our AI-powered writing assistant is much more than just a conversation tool. It is designed to be your personal assistant in document writing. Whether you need to rephrase a sentence, correct an error, or simply find inspiration, it is there to assist you in real time.
Contact us
Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!
* Your privacy is very important to us. Please click here to view our Policy
