Product blank

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.

Tips blank

4D REST API + ReactJS

by Mourad Aouinat, Software Engineer at 4D Morocco

In a previous blog post, we saw how easy setting up a REST API using 4D. In this blog post, we will leverage the powerful 4D REST API in combination with React to build a To-Do app that includes features to open todos, create new ones, modify existing ones, and features for bulk modification and bulk deletion.

Product blank

Get ready for the new SameSite and Secure attributes for cookies

Cookies’ abilities have grown and evolved over the years, but they have left some legacy issues. To handle this, browsers (including Safari, Chrome, Firefox, and Edge) are changing their behavior regarding the SameSite and Secure attributes for a secure-by-default model for cookies.

As a 4D web developer, you may be concerned about the 4D web sessions session cookie if you want to prevent your application from Cross-site request forgery.

To prevent your web session cookie from circulating on the web pointlessly or being misunderstood by browsers because of a default value applied, you should ask if it is:

  • a third-party cookie: associated with a domain name different from that of the page where the cookie is encountered. A third-party cookie is placed by a page object (e.g. an ad) originating from a domain other than the one hosting the page

or

  • a first-party cookie: associated with the domain of the page

 

Depending on your use case, you should choose the appropriate value for the SameSite attribute of your web session cookie.

To reinforce security, the Secure attribute must be set for the web session cookie when the connection is secured (HTTPS) to indicate to the browser that the cookie can be sent safely.

Keep reading to learn how 4D has your back to improve privacy and security across the web.

Product blank

4D Data Explorer in Action

Even though the 4D Data Explorer is still in Preview version (there are certainly more features to come in the next versions), we thought we’d show you the product in action and let you discover its capabilities.

This is a web browser interface usable by the administrator as well as the developer, remotely (in a secure way with an HTTPS connection) or locally on the same machine as your opened database.

Need to check your data during development? Need to find data that could cause bugs? The Data Explorer, with its powerful query engine and intuitive web interface, is made for you!

Let’s watch the video:

Product blank

Support of Cross-Origin Resource Sharing (CORS)

Have you ever created an HTTP data request only to get hit by a red “access to HTML request has been blocked by cors policy” error?

When your site is on the same domain as the web service server, there’s no problem. However, this isn’t the case when performing a cross-origin request. Access is denied due to browser security preventing HTTP requests to another domain. The result? A CORS policy error.

To help you explicitly allow certain cross-origin requests on your server, 4D now supports the CORS protocol. Accessing data with cross-origin requests just became easier!

Product blank

Multiple web servers in a single 4D instance

Have you ever needed to use multiple web servers in order to, for example, split your web application code into several business units, or separate the administrator’s web server from the user’s or run an old part, not preemptive-ready yet, in a separate instance, allowing the main part to run preemptive?

If you’re nodding your head yes, then keep reading because 4D v18 R3 allows you to do so … with ease.