4D Blog

Home Product QODLY STUDIO FOR 4D: WHAT’S NEW IN 4D 20 R7

QODLY STUDIO FOR 4D: WHAT’S NEW IN 4D 20 R7

January 9, 2025

Product

We’re sure you’ll be pleased to explore the new features Qodly Studio for 4D brings with 4D 20 R7.

Keep discovering this powerful platform—a robust and user-friendly solution for building business web applications with minimal coding effort.

Integrated within 4D, Qodly Studio for 4D allows you to leverage existing business logic developed for desktop applications.

Let’s dive into the details and see how your app can deliver more than just data while offering a dynamic user interface and strong data protection through setting up privileges.

DELIVER MORE THAN DATA WITH THE NEW 4D.IncomingMessage class

With your Qodly app, you can now easily enable file downloads for your end users.

Use the new 4D.OutgoingMessage class, which your app can retrieve via an ORDA function call or a singleton function call.

This leads to returning web content complete with a body, HTTP headers, and status codes ready for the browser to process.

Just implement a function returning an instance of the new 4D.OutgoingMessage class, set up the function call, and the web browser handles the 4D.OutgoingMessage class automatically. No extra steps are needed!

Read this blog post to learn more.

example

In the example below, the getThumbnail() function of the Products dataclass receives as a parameter a product name, a width, and a height. It returns to the browser an instance of the new 4D.OutgoingMessage class whose body contains a thumbnail of the product image with the required size.

Note the use of the new onHTTPGet keyword. If this keyword is applied to a function, this function is callable with a GET verb! Downloading a file can be done by simply clicking a link.

Class extends DataClass


exposed onHTTPGet Function getThumbnail($name : Text; $width : Integer; $height : Integer) : 4D.OutgoingMessage
	
var $file:=File("/RESOURCES/Images/"+$name+".jpg")
var $image; $thumbnail : Picture
var $response:=4D.OutgoingMessage.new()
	
READ PICTURE FILE($file.platformPath; $image)
CREATE THUMBNAIL($image; $thumbnail; $width; $height; Scaled to fit)
$response.setBody($thumbnail)
$response.setHeader("Content-Type"; "image/jpeg")
	
return $response

It’s so easy to set up this function call in Qodly!

And here is the result in action!

blank

new OnPrivilegeChange event

If you have set up privileges to protect your data, access to data is not granted if the appropriate privileges are not in the Session.

This can lead to annoying scenarios like this one:

  •  The user is not authenticated, and the session contains no privileges, so loading a Qodly source (referring to data protected by permissions) at application startup fails because the appropriate privileges are missing
  •  The user authenticated, the appropriate privileges are now in the session, but … the application is not notified of this to load the Qodly source

 

Thanks to the new OnPrivilegeChange event available on the Page, you can trigger an action (standard action, navigation, or function call) when the privileges in the Session on the server have changed.

example

In the example below, the HealthCare application has a header displaying statistics (number of doctors, number of patients, …). This header also displays the top doctor (the doctor having the greatest amount of appointments). It is a shared Qodly source (mostBusyDoctor) loaded at application startup.

As long as the user is not authenticated, this information is unavailable because access is not granted to read the doctors. Once the authentication is done, thanks to the new OnPrivilegeChange event set up on the Header page, this datasource can be loaded.

blank

And here is the result in action; look at the header!

blank

Roles and privileges – Show/hide the inherited privileges

If you have already used the Roles and Privileges interface and set up some nested privileges, you know it is a good thing to view which permissions are inherited from others.

But sometimes, you must focus on a lighter view with only the permissions you explicitly set up for a privilege.

This is now possible. Just activate a toggle for that!

blank

Don’t wait any longer to try that new Qodly studio for 4D features and make your web app user-friendly and powerful!

Discuss

Tags 20 R7, 4D Qodly Pro, Qodly Studio

Latest related posts

  • June 16, 2025

    Generate, share and use web sessions One-Time Passcodes (OTP)

  • May 20, 2025

    Automatic Refresh of OEM Build Licenses

  • May 16, 2025

    New class to handle incoming TCP connections

Avatar
Marie-Sophie Landrieu-Yvert
• Product Owner • Marie-Sophie Landrieu-Yvert has joined the 4D Product team as a Product Owner in 2017. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.Marie-Sophie graduated from the ESIGELEC Engineering School and began her career as an engineer at IBM in 1995. She participated on various projects (maintenance or build projects) and worked as a Cobol developer. Then she worked as an UML designer and Java developer. Lately her main roles were analyzing and writing functional requirements, coordinate business and development teams.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

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