Skip to main content

Development Environment

Data Development Environment refers to an instance of a web editor in every Data installation in which you can view, create and edit source file like DSL, configuration files and interpreted code (RPGLE). In the development environment you still cannot edit the source code of your micro executors except for the RPGLE code as it is interpreted. For the creation and modification of a micro-executor, you can follow a later guide.

If you have already followed the previous getting started guide you have already been able to see the development environment and try it out. In that case you connected to your sandbox instance and were able to edit the sources. You were able to achieve that because in the Data installation, by default, there is a development tenant registered called sandbox.

Create the development environment for your application

Each application in Data is configured on a minimum of 2 tenants:

  • Production Tenant: the tenant were users connect and work with the application
  • Development Tenant: the tenant were developers and consultants work to fix or develop new features of the application

The application may have another optional tenants like:

  • Staging Tenant: the tenant were user, developers and consultants test the bugfix and new features
  • Testing Tenant: the tenant were automatic processes test the application

To learn how to define the tenants of your application, read the AHD documentation.

Configure the development environment for your application

As mentioned above, each application is built through micro executors and DSL libraries. The development environment allows remote development of DSL libraries. To work safely each DSL library should be saved in a cloud repository like Github or Gitlab. Platforms of this type make it possible to work in teams with branches and rules, manage versions and histories and have an always-on backout.

Now let us move on to correctly configure the development environment.

Prerequisites

  • User (The sandbox user is fake, you have to request a real one from the administrator)
  • Github or Gitlab user

Steps

The next step shows how to work with a specific DSL library called kokos-dsl-smeuplab located in https://github.com/smeup/kokos-dsl-smeuplab.

warning

The repository is private and is only used to explain how it works. You must use the repository you have designated for your application.

1. Connect to development tenant

Go to Data frontend application (default: https://[IP/DNS]:[PORT]/WebUP) and login with the following credentials:

User: <your username>
Password: <your password>
Environment: <your development tenant id. usually called: [production-tenant-id]-user>

i.e.

My Data installation has 2 tenants:

  • smeuplab: producution tenant
  • smeuplab-user: development tenant

You can use smeuplab-user as tenant id in login module to connect to your development tenant application.

2. Navigate to development environment

Go to debug view typing STRDBG in search bar.

Click to Development Environment Url to go to your development environment. In this path each folder is mapped as a source library and according to its name is loaded from a specific tenant.

i.e.

If you create a folder named kokos-dsl-smeuplab this is mapped to the smeuplab-user tenant beacause the tenant is configured to load folder so named.

3. Create development DSL library

As shown above you could create a folder with the common name and structure of the DSL library and it would work. So any source that is created with the same name as the original is overwritten and only you see these changes.

To work better and securely, however, we now see how to synchronise the remote repository, common to the whole team.

Verify that development environment url ends with libs. the complete path should be ?folder=/home/kokos/users-workspace/[YOUR_LOVERCASE_USERNAME]/libs.

Open new terminal:

  • click to menu located in top left ()
  • click to Terminal menu item
  • click to New Terminal.

Go to terminal and try to clone repository:

git clone [DSL_LIBRARY_CLOUD_REPOSIOTRY_URL]

i.e.

git clone https://github.com/smeup/kokos-dsl-smeuplab

Configure personal github user:

cd [DSL_LIBRARY_FOLDER]
git config --local user.name "[GITHUB_USERNAME]"
git config --local user.email "[GITHUB_EMAIL]"

i.e.

cd kokos-dsl-smeuplab
git config --local user.name "jonhdoe"
git config --local user.email "john.doe@smeup.com"

Your DSL library is now configured. Now you can try to create or edit files and see changes in development tenant reloading relative pages.

VSCode IDE

The development environment is the VSCode IDE. You can consult the official documentation to learn how to boost your development experience.

Git

In the development environment there is already installed the extension to simplify the git usage. Git allows you to work in safely using branch, commits and pull request. See official documentation to learn how it works.