Project databases: Architecture

Automatically translated from English

Project databases, the headliner of the 4D v18 release, allow distributed teams to work collaboratively by storing an application’s code in a source control system, in text files containing everything from the database structure to the user interface, including forms, menus, user settings, or any required resources. And since a project database is made of text-based files, you’ll have several folders and files, stored within a single parent database folder. In this blog post, we’ll go through the architecture of a project database to give you a better understanding of this new type of database.

The architecture of a project database

A project database is made of several folders and files, stored within a single parent database folder.

 

When you create a project database, you’ll find most of the same folders as a traditional binary database:

  • Data
  • Logs
  • Resources
  • Settings
  • WebFolder

 

Project databases include two additional folders:

  • Project – Application source code (equivalent to 4DB)
  • userPreferences.<name> – This folder contains files that memorize user configurations, (e.g., break point positions, window positions, etc).

Projects and Source control

Now that you know the folders and files in a project database, which folders or files should you upload to a source control system? Perhaps, you’re thinking it’s the Resources and Project folders. Well when you compile your database, 4D stores the compiled code in the “Project/DerivedData” folder. Therefore, it’s recommended to upload the “Resources” folder, the “WebFolder” folder and the “Project” folder (without the “DerivedData” sub-folder) to a source control system.

binary database vs project database

In this video, we compare the architecture of a binary database (.4DB) vs a project database (.4DProject).

For example, to open my binary database, I select a file with the “.4db” or “.4dc” extension. What’s the equivalent in a project database? It’s the file with the “.4DProject” extension.

For the compiled database, what’s the equivalent of the “.4DC” file? In a binary database, the source code of the application is found in the files with the extension “.4DB” and “.4DIndy”. For a project database, which folders or files correspond to the structure?

You can find the answers to these question and more in the video below:

Vanessa Talbot

• Product Owner •

Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.

Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.