Versioning a conzept 16 project

versionControllImage

The distributed version management of a project is a necessary optimization for the development process, especially when several developers are involved in the project. For us, this necessity has arisen, which is why we have set up a Git server in our company, with which our conzept 16 project is placed under distributed version management. As some customers have already asked about versioning conzept 16, I would like to present our solution to you.

What is Git?

Git is a free distributed version management system for primarily text-based files. What is special about it compared to other similar programs such as SVN is that no central server is required to work on the project. The repository, which is available locally but can also be located on a server, is organized in branches. Changes to the project are saved as a snapshot by means of a commit. The last commit is tracked by version control. The current commit in the current branch is referenced by a pointer. Each new commit points to its predecessor. A commit consists of a commit object which, among other things, refers to a tree object in which the project files, i.e. BLOBs, are referenced. All objects are identified and controlled by a hash.

More about Git at Git: Book and Wikipedia.

Versioning in action

Of course, you can work with Git using the command line. However, there are some useful Git clients that simplify the whole thing somewhat – for Windows, for example, TortoiseGit.
In order to place a conzept 16 project under Git versioning, however, a few functionalities are required, completely independent of Git, as there is no direct interface between a conzept 16 application and the versioning tool. This means, for example, that it is not possible to work directly on the procedure version that is available in the repository, but only on the version that is available in the database.
We therefore first had to think about what exactly from the project should be placed under version control. In our case, this concerned the database procedures and the data structure. We also had to think about a workflow that would be suitable for working in conzept 16 using Git.
Consequently, we needed a way to export procedures from the database to the Git directory or, conversely, to import them. In order to do this conveniently and efficiently during project work, we have decided to create a plugin that works on the basis of the conzept 16 plugin interface. The Git plugin is an additional window that is opened next to the Designer and looks like this:

conzept 16 Git-Plugin

The plugin can be used to export all procedures from the database and import them into the database. It is also possible to export the data structure file by file in XML format. In addition, the most important Git commands for us (commit, checkout, push, pull and fetch) can be executed. Of course, Git must be installed on the computer for this. However, the functions also require a workspace to be selected.
Commit:
Create a snapshot with the current changes to the branch

Checkout:
Switch to another branch or create a new branch. Can also be used to reset the branch to the last commit

Push:
Synchronize the branch with another branch, which may be located on a server, for example

Pull:
Update the local repository to the status of a repository that may be located on a server, for example

Fetch:
Updating repository information
With regard to conzept 16, it should be noted that the procedure status must be imported from the local repository into the database after a checkout or a pull. Before a commit, the procedures must be exported from the database.

The window consists of the buttons that can be seen on the left of the plugin image, as well as a label (under the “Select Workspace” button) to display the status and the current branch. The rest of the window is taken up by a textedit object in which status texts are displayed that are generated directly by Git.

The Git commands are executed by SysExecute().

The plugin is developed according to the template manager from the CodeLibrary. If you are interested in the plugin’s procedures, please feel free to leave a comment.

Leave a Reply

Your email address will not be published. Required fields are marked *

Leave the field below empty!

Categories
[newsletter2go form_type=subscribe]
[newsletter2go form_type=unsubscribe]

REQUEST YOUR EVALUATION LICENSE NOW!

TEST THE CONZEPT 16 COMPLETE VERSION - NON-BINDING AND FOR FREE

Subscribe to our newsletter

[cleverreach_signup]