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.
Access Qodly Studio for 4D directly from your 4D server to test and debug your code
Qodly Studio for 4D allows you to extend your 4D applications with web pages. Development is integrated into 4D Developer Edition.
During the development phase, there are often times when specific features or bugs can only be replicated on a server or in a production environment. This poses a challenge for developers, who require direct access to debugging tools to efficiently resolve issues.
With the latest release of 4D 20 R7, Qodly Studio for 4D is now accessible directly from your 4D server, you can debug and test your Qodly application like never before.
Here’s a quick guide on how to make the most of this new feature.
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.
When Qodly.com Meets 4D Server, What Are They Talking About?
Last September, 4D unveiled Qodly Studio for 4D, offering comprehensive benefits that enable you to seamlessly create dynamic, efficient business web applications. If you haven’t yet, check out this blog post to learn how to get started with Qodly Studio for 4D.
Qodly Studio is also accessible on qodly.com, forming a part of 4D’s new SaaS offering.
Excitingly, the synergy between Qodly.com and 4D applications reaches new heights with the introduction of the QodlyScript openDatastore command. This feature enables qodly.com web applications to seamlessly connect with 4D applications deployed on 4D Servers, facilitating the utilization of 4D projects as remote datastores. So, if you’re eager to harness the power of your 4D application data and business logic within a qodly.com environment, you’ll be delighted to learn about the possibilities offered by Qodly Studio’s latest advancements.
Now, picture this scenario: your existing 4D Server-based application serves both desktop and web clients using Qodly forms. If this setup mirrors your current approach, feel free to skip ahead.
But if you want to extend your existing 4D server-based application with a totally new one, only web-based – and this one hosted on Qodly.com then this post is for you and shows how to communicate between both.
Deprecation of the Legacy Network Layer
To handle the communication between 4D Client and 4D Server, 4D proposes 3 different network layers:
- Legacy,
- ServerNet,
- and QUIC.
The Legacy network layer was introduced 30 years ago in 4D v3. It was originally developed for AppleTalk, enhanced for ISDN, and then added IPX and finally TCP/IP.
It was created for a very different Client/Server usage than 4D works today: it is single-threaded, optimized for slow networks with no encryption, and available for many different network protocols. As such, it is not optimized at all for modern network communications and supports a very limited number of features.
That’s why, with 4D 20 R5, we have decided to make the Legacy network layer obsolete and plan to remove it soon. We encourage you to move to ServerNet now if you are still using it. Let me explain what benefits you will get from the switch.
SSL/TLS: Support for ECDSA certificates
4D uses SSL/TLS to secure client-server communication and HTTP requests. 4D is supporting RSA cryptography since more than a decade and with 4D v20R4 we are now adding ECDSA cryptography to our tool belt. It’s a good moment for me to speak a bit about security.
Developing Concurrently on 4D Server in Project Mode
Since its release in 4D v18, Projects drastically expanded 4D’s capabilities by bringing compatibility with version control systems —among other things.
With excellent feedback, we couldn’t be prouder to see significant adoption of this feature among the 4D community. This pushed us to improve it to make it even better.
Your feedback included a request for the possibility to work simultaneously on a single development server as a team. Again, 4D listened, and we are thrilled to announce that with 4D v19 R6, you can work on a development server in project mode!
Disabling explorers on merged servers
You may want to restrict administrators from accessing the Data Explorer and the Runtime Explorer in your deployed merged servers. 4D v19 R5 enables to do so.
Here is everything you need to know.
Simplified cross-platform client/server application building on Windows
The release of Silicon Macs had a great impact on the way 4D compiles applications. Before v19, 4D was compiling only for Intel architecture, using the same code on Mac and Windows. But Silicon Macs use a new architecture, and as such 4D needs to compile specifically for Silicon. It affects cross-platform client/server application building.
As long as you build your server on Mac, it’s not much of an issue, as you can compile for both Intel and Silicon platforms. But on Windows, it’s not possible to compile for Silicon Macs. Our current recommendation is to compile the project on Mac for both architectures, and then copy it on a Windows machine before building the server. Unfortunately, for big projects with a lot of data, the copy can take some time.
Monitor 4D Server activity with this new tool
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