For many years, 4D has allowed you to develop binary databases as part of a team with a 4D Server. This way of developing is straightforward, but many developers asked us to be more efficient on source code management to deliver better traceability. 4D has heard them and developed Project mode to fit this need. This mode opened a new era of collaboration thanks to version control systems!
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.
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.
Project mode allows you to easily track changes with Git, the most popular version control system. But often, you don’t want to track all the files of your project in the Git repository. 4D now offers you the possibility to define what not to track in your new projects.
by guest author Michael Höhne, 4D developer (Munich, Germany)
There’s a feature in 4D v18 R5 that may have been overlooked, or at least hasn’t gotten much attention so far: Form macros. To be honest, I hadn’t spent much time on them either, until recently. In this blog post, I’ll show you a macro that saves a lot of time when applying naming conventions to list box columns, column headers, and footers. You can easily change it to fit your needs. A dedicated repo is also available on Github.
If you’re a fan of macros in the code editor, then 4D v18 R5 has some good news for you … because now macros are also available in the form editor!
Let me start by telling you how useful macros can be for you. Have you ever needed to use formatting or naming rules in your application, then apply them to each new form? Or maybe you’ve had to work on existing forms created by someone else, and always need to do the exact same checks and analyses before getting started. If you’ve ever encountered one of these scenarios, then 4D v18 R5 is for you because it gives you the ability to create macros and save time on predictable, repetitive tasks.
Using $1, $2, and $n variables in your code not only makes the code less readable, it can also increase confusion since the human brain can find it difficult to remember what these variables correspond to. The solution is to create a variable with an understandable name and assign it the value of $1, $2, or $n.
4D v18 R5 has good news, you can now name your parameters when declaring:
- a project method,
- a trigger
- a database method
- a form method
- a constructor of a class
- a function of a class.
Let’s see how!
In 4D v18 R5, you can preview the final CSS rendering in the form editor WITHOUT running your dialog. Yes, you heard that right. Standardizing and reviving your forms has never been easier!
If you haven’t yet heard about CSS in 4D, now’s the perfect time to learn more! Introduced in 4D v18 for project applications, this concept includes enhanced and quick style sheets based on CSS. I recommend taking a look at this blog post.
With projects and the ability to share project application source code via a source control system, we’ve published more than 35 repositories to GitHub (at the time of writing this blog post). This includes HDIs, components, and full example applications. Speaking of full example applications, two more have recently been added:
Projects were introduced in 4D v17 R5. An architecture representing a giant evolution for 4D applications, projects opened the 4D world to source control tools, collaborative programming, code sharing, modularity, and much more! To make things even better (and simpler), 4D v18 R4 creates new projects by default, while developers – if they choose to do so – can continue to create binary databases via a simple setting.
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