Enhanced Session Management for Development and Testing
With the latest 4D updates, we’ve extended the Session command to the Client/Server connection, enabling access to session storage at the Client level. Pairing this functionality with the new ‘Restrict’ event in ORDA classes makes filtering results based on session data—such as privileges, roles, or even geographic areas—easier than ever.
Developing an application in 4D meant working in a local environment, such as a single user. In standalone mode, the Session command always returned Null. This meant that you had to write complex code, checks whether the Session object was Null to read from “Storage” or “Session.storage”. This workaround, while functional, was not elegant.
With 4D 20 R8, this is no longer an issue. The Session command now returns a valid object, even in standalone mode, simplifying application development and testing.
Introducing Session Singletons
Singletons have been one of the standout features of 4D 20 R5. Previously, developers could leverage two types of singletons:
- the process singleton, which is unique to each process but different across processes,
- and the shared singleton, which is unique across the whole application.
With 4D 20 R7, we are releasing a new type of singleton: the session singleton!
Exciting enhancements for managing processes and sessions
Managing processes and sessions is essential for optimizing and monitoring your 4D applications. You can easily manipulate and retrieve crucial information about these elements thanks to different commands.
With 4D 20 R7, we are pleased to announce a series of enhancements that make these functions even more accessible and effective. These new features are designed not only to simplify your work, but also to boost the performance of your code. The improvements include:
- Getting the process info in an object to make it easier to manipulate the properties,
- Allowing direct access to session info using a session ID for easier management,
- Making it easier to get a process number directly from its ID,
- Accessing the creation date of a process
- Optimized filtering of the results returned by the Process activity command to obtain all processes in a session.
Find out how these updates can transform your development experience and improve the efficiency of your applications!
Permissions: Inspect Session Privileges for Easy Debugging
Today, you can benefit from a powerful feature to filter access to data, which is essential for preventing malicious access to your application.
This feature uses privileges that allow certain actions on your data. These privileges are assigned to users through roles and stored in the Session during authentication.
In 4D 20 R6, we enhanced this functionality by allowing you to inspect the privileges in the Session, which is very helpful for debugging.
Keep reading to learn more.
Enhanced Session Storage Access
You can store information in the storage of various session types, such as Client/Server, Web, or Mobile, allowing for easy reuse across different processes.
Now, in 4D 20 R6, you can access the storage of a specific session. This enhancement enables users to easily maintain the continuity and consistency of information across multiple sessions of the same user. Imagine being able to pull up the same customer record across different applications such as Client/Server or Web.
New 4D remote session object with Client/Server connection and Stored procedure
In 4D applications, four types of sessions exist 4D Remote session, Stored Procedure session, Mobile session, and Web session.
The Session command already returns Web or Mobile sessions. This gives you access to a wealth of information about the session and an object shared by all processes in the session.
In 4D 20 R5, the Session command has been extended to the Client/Server connection and stored procedure.
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!
Debug on the server with scalable web sessions
Scalable web sessions were a significant improvement brought by 4D v18 R6. They allow you to use 4D tags, 4D actions, and REST API in preemptive processes, even in interpreted mode, on a 4D server. However, to debug such programs, you needed to open your development environment on the server to make it switch to cooperative mode, as the debugger window cannot be opened with preemptive processes. This way, until v19 R2, you could debug REST, 4D actions, or 4D tags. From v19 R3, all of this has become much easier, and you can debug on the server-side simply by attaching the debugger to it, as usual.
How to define sleeping timeout for remote 4D applications
To prevent session loss, 4D monitors the sleeping state of remote 4D applications.
When a user is connected from a remote 4D application to a 4D Server and their computer goes into sleep mode, the information is sent to 4D Server. At the moment the user’s computer wakes up, the remote 4D application then recovers its execution context.
Scalable sessions for advanced web applications
Nowadays, web applications are essential modern tools. As machines and processors become more and more powerful, your web applications must constantly meet performance requirements. This is why with 4D v18 R6, the 4D Web Server offers a new kind of web session: the scalable Web session.
Let’s find out more!
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