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 20 tips:
A new feature of the VS Code extension arrives with 4D V20 R2: code formatting!
In this blog post, we will delve into the details of this new functionality, exploring how it simplifies your programming experience.
We understand the significance of email communication and recognize that sending emails is a frequent requirement in modern applications. Numerous individuals who use Gmail have expressed their desire for an API that facilitates email sending through Gmail API. The integration of OAuth 2.0 was essential to establish a connection with the Gmail server.
We are pleased to announce that we will be venturing into Gmail management and implementing a ‘send email’ command.
In 4D v20 beta, we were excited to show you our work on the new QUIC network layer. As the layer is still in the beta version, we deactivated it for the LTS final release. The QUIC layer will be available in the feature releases, so you can follow its development and help us improve it.
While 4D v20 allowed switching network layers only in interpreted applications and forced a new build for engined applications, 4D v20 R2 allows layer changing in compiled/build applications via the Structure, User and Database Settings to facilitate testing even in production.
Throwing errors in your 4D code is now possible starting from v20R2.
Those errors behave as any 4D error: they trigger an error dialog or can be handled in an ON ERR CALL method.
This feature will ease your life because you’ll be able to improve the quality of your code by proactively detecting errors as soon as they occur. You can also handle better error logging.
Before digging into details, It’s important to note that this feature is the first step towards achieving robust error management.
Now, let’s dig into the details!
With 4D v19 R3, connecting your application to the Microsoft Graph API through OAuth 2.0 has become incredibly convenient using 4D NetKit.
Now, with 4D v20 R2, you can seamlessly obtain an OAuth 2.0 token for Google API or other OAuth 2.0 servers. And even better, to further enhance the integration of this authentication process into your application, we have introduced a feature that allows you to display your HTML page directly in your web browser once the token is received.
Keep reading for all the details!
Tables are among the most essential elements in 4D Write Pro documents. 4D v20 R2 brings a new improvement to help you better organise and present information within tables. Say hello to the possibility of merging cells!
In an era where data security is paramount, updating security libraries is crucial.
4D v20 has taken a significant step forward by upgrading its OpenSSL library from version 1.1 to 3.1.
This advancement brings forth a multitude of advantages and improvements for 4D developers, enabling them to build applications that are not only highly secure but also exceptionally efficient.
Now, let’s explore these benefits in detail.
In today’s interconnected world, the need for real-time updates is paramount for websites and IoT applications.
A way to deliver information instantly to your sites or applications is to use the Websocket protocol which provides a full-duplex communication channel between a server and a client. From 4D V20, you can create a websocket server with the 4D.WebSocketServer class. We continue in v20 R2 with the 4D.WebSocket class that allows you to create a websocket client to connect to any websocket servers.
A new build4D component has been available on GitHub for a few months. It empowers you to effortlessly create a compiled project or a component. Things are getting even better; this new component version will enable you to generate a single-user application, expanding the possibilities for your development workflow.
So with tool4D available since v20, integrating the application generation process into your CI (Continuous Integration) tools has become remarkably convenient.
Let’s delve into the details!