ORDA – Constructor and touched event – Detailed behaviour through a network
In this previous blog post, you discovered that ORDA entities can now have a constructor, allowing entity instantiation to follow a complete object-oriented approach.
And that’s not all — another blog post introduced the first ORDA data event in a full series: the touched event.
Want to know exactly WHEN and WHERE the constructor and the touched event are triggered while actions move back and forth between a client application and the server? This blogpost is for you.
Keep reading to learn all the details and explore a live demo!
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!
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 …
ORDA – Say Goodbye to Empty Spaces in Your Entity Selections
We’ve all been there. You build a beautiful interface that displays an entity selection for users. They can drop entities to refine their choices, but then… those empty spaces appear where the dropped entities used to be.
Rebuilding the entity selection after drops? No more! 4D 20 R6 introduces a handy feature that eliminates this pain point with just one line of code.
Keep reading to discover how this feature can keep your interface clean and your users happy.
ORDA – Restrict Data to Relevant Criteria
In 4D 19 R8, we introduced a robust permission system, granting you granular control over user access to your data. This system protects your data depending on who accesses it and which data is accessed, ensuring data security by restricting unauthorized access.
But what if you wanted to further refine read access based on specific criteria?
That’s where 4D 20 R5 steps in. Restricting read data according to some criteria.
Improved 4D Client Licenses Usage with Qodly Studio for 4D
Those of you who have started using Qodly Studio for 4D already know how powerful this new tool is for developing business web applications. If you haven’t yet, find here more information on getting started.
Apps made with Qodly Studio for 4D rely on the REST APIs. 4D 20 R5 is shipped with a great new feature: “Force Login” mode.
With Force Login mode, a 4D Client license is only consumed when users successfully log in and begin working with your application’s data and logic.
Keep reading to find out more! And don’t forget to download our demo to see it in action!
ORDA: Assigning a path to a blob or picture attribute
Non-ORDA database commands allowed you to put images and blobs outside your data file thanks to the SET EXTERNAL DATA PATH command. This command is not adapted for ORDA, so we have decided to add similar functionality in v20 R3: The ability to assign to a blob or picture attribute a path pointing to a file. Let me tell you more about it.
Qodly Studio in action with a new demo
In this previous blogpost, we provided some demos to help you starting with Qodly Studio.
As promised, we keep providing demos. Here is the latest PIQS (short for Play In Qodly Studio)
Logging ORDA Calls on the Server
Since its release, ORDA has grown in popularity and is now widely used on your production servers.
With 4D v20, we provide two improvements on how ORDA requests are logged server-side:
- The first is an improvement of the request log that will now give more information about ORDA calls.
- The second is the addition of a server-side ORDA log similar to the client-side ORDA log. Let me introduce you to these new features.
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
