· Feb 1, 2023 2m read

Prepare ObjectScript sources for version control without the IRIS Studio

In our team, there are several developers working in parallel on different projects. To ensure this distributed collaboration and high-quality code reviews, we rely on version control with Git. Our challenge is to harmonize the unique characteristics of InterSystems products and the possibilities of Git and Docker.

The IRIS Studio development environment does not provide sufficient support for Git. Therefore, we additionally use VS Code as a development environment. InterSystems provides extensions for VS Code which ensure that we can write ObjectScript code in VS Code. At the same time VS Code provides intuitive support for Git functionality. This enables us to manage ObjectScript code etc. centralized in our repository, develop on feature branches and create pull requests.

We prefer to implement new features locally on our computers in order to minimize potential risks. Docker images from InterSystems work well for this purpose. We usually receive a studio export in XML format that our customers provide. However, since we don't want to keep the export but the sources referenced in it in our repository, we were looking for a way to convert the export into classes, lookup tables, schema files, etc.

One option would be to use the IRIS Studio locally, import the export and export the sources via VS Code Extension. In principle, this approach works as well. However, our challenge involved avoiding the installation and use of the IRIS Studio in addition to the need to install an IRIS instance locally.

Therefore we had to develop the conversion tool "XML-to-UDL" for our projects and are happy to make this available to the community.

In essence, it is a Docker image that can be pulled from the Github Docker Registry. The tool only needs a Studio Export file (.xml) and takes care of converting the content. The GitHub repository including a small demo can be found here.

This allows us to generate the sources of an existing project within seconds and use version control with Git without having installed an IRIS instance or a Studio locally.

This step is part of our current workflow. To develop and test an existing project locally, we use the community's ObejctScript Docker templates. When the development is finished and a code review is completed, the push to the master branch triggers a pipeline, which in turn generates a new Studio export from the sources within the repository, which we can then distribute to our customers, for example.

Discussion (2)1
Log in or sign up to continue

Hi Tommy,

Your video is now on InterSystems Developers YouTube:

⏯ xml-to-udl
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

Great work!