How to Implement Continuous Integration with 4D: A Step-by-Step Guide
In the world of software development, a new concept has appeared in recent years called “Continuous Integration.” The definition we see or hear everywhere is :
“CI is a process that automates the compilation, testing, and delivery of an application on a regular and frequent basis.”
Having understood this definition, which expresses an interesting and promising process, what do I need to do to implement it in 4D? If you search the Internet, you’ll find that there are many CI tools and frameworks available.
However, there are several prerequisites before using these CI tools.
A Tool for 4D Code Execution in CLI
In the development industry, CI/CD has become a standard practice. With each code modification, automated actions such as testing, compilation, building, delivery, and sometimes deployment are generated to ensure the code is high quality and easily integrated into the existing system.
These actions require a tool to execute the necessary code. As 4D developers, we decided to provide a free tool that allows developers to execute elementary actions. This tool is called tool4d, and it streamlines the process of executing necessary actions within the 4D environment.
In this article, we will explore the functionalities of tool4d and how it can be used to enhance your development process.
How to automate the compilation
Since 4D v19, you can start the compilation of a project with a simple command. You might be wondering what you can use this for!
Your team may consist of several developers, so why not automate the compilation at each code push on your source control server? It is always easier to identify an error when it is quickly detected.
Another case is when your project consists of several components. You can write a method that compiles, builds, and then copies the component to the host database.
This blog will discuss the different technical points that are very useful to create your own automation tools, along with an example application.
Headless 4D applications
As a 4D developer, you may have already encountered a need to develop applications without a graphical user interface (GUI), otherwise known as a headless applications. Previously in 4D, this wasn’t entirely possible to do …. until 4D v18! In this blog post, we’ll go through some of the newly available capabilities so you can make your applications “headless”!
Why create headless applications? There are several use cases such as simulating Windows behavior on macOS, or having the Windows service behavior without using the service manager, and so on. But above all, it opens new opportunities such as developing bots with 4D.
Improving databases tests
As a developer, you’re aware that improving the quality of your developments is often based on unit tests. In order to launch these tests, developers and QA teams need tools to launch 4D databases in different modes (single user / client-server) and distinct environments (Macintosh / Windows).
4D products can already be launched using command line parameters to allow automatic testing or deployment. What if you want to create your own update mechanism or you need to handle a server farm with hundreds of 4D Servers running? Maybe you want to specify which database file to use – or pass parameters on launch …