Master HTTP Requests with 4D Request Handlers
In today’s web-driven world, servers process an overwhelming number of requests. Efficiently analyzing, counting, interpreting, and rerouting these requests is essential, especially when applying MVC principles.
In 4D 20 R8, with the introduction of HTTP Request Handlers on the 4D HTTP Server, you can define accurately which business logic you want to trigger regarding specific URLs patterns.
Main advantages of this feature are:
- Offering more granularity in implementing the code handling received requests. This business logic can be split in several classes. Forget extensive Case of statements in the On Web Connection database method.
- Allowing a redirection on a Qodly page which opens up new perspectives to extend 4D application on the web
This powerful feature unlocks many possibilities, as detailed below. Keep reading to learn more and work with concrete examples.
Windows Server 2025, a quick update on OS certification
Microsoft released Windows Server 2025 on November 2024. Time for a quick update of compatible and certified OS for 4D.
Tips & Tricks for your 4D Apps – January 2025 Edition
by Add Komoncharoensiri, Director of Technical Services at 4D Inc
Here we go with another set of tips and tricks.
The 4D Knowledge Base is a library of information about 4D technology where weekly tech tips and monthly tech notes are actively published. If you missed the last tips on the KB, that’s fine; here is a compilation from the past few weeks.
This blog post covers 18 tips:
New class to perform TCP connections
With the release of 4D 20 R8, a game-changing feature has arrived:: the TCPConnection class. This modern class leverages object-oriented syntax and supports asynchronous network connection handling, providing a fresh and powerful alternative to the 4D Internet Commands. Using TCPConnection, you can connect to virtually anything—whether it’s servers, printers, cash registers, or industrial devices—making it a versatile tool for handling unique networking requirements.
In this release, the TCP client functionality is available, allowing you to connect to external servers and seamlessly exchange data.
4D Write Pro – Sign and secure documents
The purpose of this article is to show how, in an easy-to-implement way, you can sign and verify documents transparently.
The obvious benefit of this approach is peace of mind when the documents are opened again, safe in the knowledge that they have not been modified in the meantime.
This is especially important if you store 4D Write Pro documents as smart templates containing 4D code as external files on disk. Before executing this code you want to ensure the file was not externally modified.
Or, in the case of external documents, to be certain that they have come from the right sender and have not been altered during their digital journey.
The principle we’re about to describe applies to 4D Write Pro documents but applies to any other type of document with a few minor modifications.
Debugging 4D Code Directly in Visual Studio Code
For Visual Studio Code users working with 4D, a new extension called 4D-Debugger that works with 4D 20 R8 is now available.
The new 4D-Debugger extension brings powerful new debugging capabilities to Visual Studio Code, expanding on the features of the 4D-Analyzer introduced earlier. With this extension, you can set breakpoints, step through 4D code, and inspect variables from the Visual Studio Code interface. This tool integrates seamlessly, simplifying the debugging process and making VS Code a more versatile workspace for 4D projects.
Notarization on macOS: Changes to Component Structure
The macOS notarization process continues to evolve. Unfortunately, the internal structure of 4D components designed with 4D v11—intended to enable cross-platform compatibility—no longer meets the requirements introduced by Apple for Silicon-based Macs, making notarizing components increasingly challenging.
To simplify the deployment process, we have updated the component structure starting with 4D 20 R8. This new folder structure makes notarization and deployment as straightforward as deploying an application. However, there is an important caveat: the updated structure is not compatible with older versions of 4D (e.g., 4D 20 R7 and earlier), while older components will remain compatible with newer versions of 4D.
The Build4D component has also been updated to reflect the new structure. When building components, be cautious and ensure you are using the correct version of Build4D.
Important Reminder: Components built with 4D 20 R7 or earlier may encounter errors during notarization. The recommended solution is to update to 4D 20 R8.
4D Netkit: Get user information from Google
Being able to access Google user information efficiently is critical for creating responsive user interfaces and automating tasks like sending emails to multiple users within a domain. To meet these requirements, we have introduced a set of features to get specific user information and to retrieve all domain profiles and contacts.
Enhancing the Debugging Experience
Debugging plays a vital role in any development process, and improving the debugger’s functionality and usability can significantly enhance a developer’s productivity. From 4D 20 R8, 4D has introduced several improvements to its debugger and remote debugger. These updates focus on saving user-defined settings, making managing and reusing expressions easier, and redesigning the overall interface.
Deploy Stand-Alone applications without embedded license
Starting with 4D 20 R7 and upcoming 4D 20.6, you can now build Stand-Alone applications without needing an embedded license. Let’s dive into the details of this new behavior.
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