Develop using low code

Develop using low code

1. Navigation

You can go to the Low-Code tool from wherever you want within the platform, by the link in the left side menu at the bottom.

Bot-Store-View-Focus-LC

You will find a view of installed packages.

Low-Code-Main-View

The "Preview" button for a package displays the source code of its module (e.g. dessia_common)

Preview-Button

Package-Preview

When you click on a row in the table, it shows all the modules and sub-packages within the package (e.g. dessia-common)

Package-SubPackage-View

Locks icon show that the package is on read only mode.

You can differentiate packages from modules by their icons on the left side of the table.

Package-Module-Icon-View

When you click on the "Preview" button for a module, it displays the source code of the module. If you click on a row for the module, it takes you to the module view

Module-View

Here we can see the module described by its doc at the top, an ordered table of the module's elements. Imports are by default hidden. To look into them, click the little arrow at the right of the module name. In the table, you can find 3 types:

Module-Icons

You can see these objects by clicking on their name (unless variables) or right click on them and click preview.

Classes and functions also have their own views

Class-View

Here we can see the class is described by its doc at the top, an ordered table of the methods

In the table, you can find multiple types of methods:

Class-Icons

You can see these method by clicking on their name or right click on them and click preview.

Finally, the "function view" (which is similar to what you can find in any code editor)...

Function-View

2. Edition

Introduction

In this section we will see how to navigate, create, delete and modify a full package within the platform. That includes following object:

  • Package
  • Subpackage / Module
  • Class
  • Function / Method
  • Variables

Package

Firstly to create your own package from scratch you need a valid [[Git-Token]] on one of our supported git client.

Creation

Navigate to Admin > Applications.

Apllication-View

Click on Create App > Create git repository

Application-View-Focus-Create-Git-Repo

Fill out the form with the required details.

Application-View-Create-git-repo-Forms

Choose the git client you want, if your Git client does not appear, there may be an issue with your Git credentials (link to git credential doc). Click here to be redirected to the page and correct the problem as indicated in the red rectangle.

Application-View-Create-git-repo-Forms-Filled

Once filled out, the system will create and commit v0.0.1 of your project with all configurations in place.

Application-View-New-Package

After creation, you can install it and restart the platform to begin modifying it.

Application-View-Focus-Restart

Suppression

To delete a repository, navigate to your Git client account. 1. Locate the repository, it will be in your personal repositories and delete it from there.

Sub-package / Module

Once you're set, we can go to low-code on the left sidebar at the bottom.

Get inside the package you wan to modify.

Creation

To create sub-packages, click on the "Create" button.

Package-SubPackage-View-Focus-Create

If you wish to create modules instead, click on the down arrow located at the right of the "Create" button and select "Module".

Package-SubPackage-View-Focus-Create-Module

Both options function similarly. Type in the names of the new elements, separating each by entering.

Package-SubPackage-View-Create-Form

Finally, click on "Add" to complete the creation process.

Package-SubPackage-View-New-Items

Suppression

To delete one ore more entities, you have to check boxes at the left of the row

Package-SubPackage-View-Focus-Checkbox

Then a delete button will appears as the download button will appears also

Package-SubPackage-View-Focus-Delete

Click on delete and confirm

Package-SubPackage-View-Focus-Delete-Confirm

Class

To create a class you need to be inside a module. So let's div into mod1.

Creation

Navigate to the desired module by clicking on it from the modules list.

Inside the module view, click on the blue plus button. Click on and then click on Class. From the dropdown menu, select "Class".

Module-View-Focus-Add-Button

A right sidebar will appear.

Module-View-Focus-Add-Class-Form

Here, you can name your class and set its parent class (default is DessiaObject). You can also add new instance attributes and preset methods directly.

Module-View-Focus-Add-Class-Form-Filled

Click on "Save" to create your fresh new class.

Module-View-Focus-New-Class

Suppression

To delete any element from the module just right click on it and delete it.

Module-View-Focus-Delete-Class

And confirm.

Module-View-Focus-Delete-Class-Confirmation

Modification

For modification go inside the Class view

Class-View-Modification

There is multiple change you can proceed:

  1. The name of the class by double clicking on the name at the top

Class-View-Modification-Name

  1. Add / Modify / Deleting methods or class attributes by clicking on the blue plus button below methods

Class-View-Modification-Add

  1. Modify instance attribute inside the init method

Class-View-Modification-New-InstAttr

Function / Method

Function and method both work the same way.

Creation

In a module or a class by clicking the plus button you can respectively create a function or a method.

Module-View-Focus-Add-Function

The will open a right sidebar that you have to fill.

Module-View-Focus-Add-Function-Form

You have to set the name, then you can already set the documentation, arguments or decorators if needed.

Module-View-Focus-Add-Function-Form-Filled

Finally click on "Save" to create it.

Module-View-Focus-New-Function

Suppression

in the module or class right click on the function or method you wan to delete and click on "Delete method" or "Delete function"

Module-View-Focus-Function-Focus-Delete

Confirm deletion and it's gone.

Module-View-Focus-Function-Focus-Delete-Confirmation

Modification

When you are in a function or method view you can change several things.

Function-View-Modification

Firstly the name, by double clicking on it you will be able to modify it.

Function-View-Modification-Name

You can add or remove decorators at the top by clicking on "Decorator" in grey and erase the decorators name or putting a decorators name

Function-View-Modification-Add-Decorator

Function-View-Modification-Erase-Decorator

You can do the same with args. Moreover, if you wan to set a default value or a type you can right click on each args and set them.

Function-View-Modification-Mod-Args

You can also drag and drop argument to put them in the right order.

Function-View-Modification-DandD-Args

Function-View-Modification-DandD-Args-Good

Finally you can write the body of the function / method.

Function-View-Modification-Body

Variables

A variable can be created in a module or in a class for instance attributes

Creation

Firstly in a module or class view click on the blue add button at the bottom and select variable.

Module-View-Focus-Create-Variable

A right sidebar will appear. Fill up the form and click on create

Module-View-Focus-Create-Variable-Form

The case Nb Indent has to be left empty.

Module-View-Focus-Create-Variable-Form-Filled

The variable will appear in your module like that.

Module-View-New-Variable

and in your class under class attribute section just below the name of the class.

Class-View-New-Variable

Suppression

This is the same for module variable as it is for class or function.

Module-View-Variable-Delete

For class attribute you need to go to the instance attribute drop-down.

Class-View-Variable-Dropdown

Click on blue plus button and select the line who contains you class attributes.

Class-View-Variable-Dropdown-Plus

Modification

For a module variable you'll have to delete it and recreate it.

For a class attribute you can go to class attribute view and right click on any of your class attributes and modify the value or the typing.

Class-View-Variable-Dropdown-Modification

3. How to Save

Introduction

First and foremost, you can only save changes in an app if you have the necessary authorization. This means you must have Git credentials for the application and be working on packages or modules that are not locked.

For example, in the image below, I can only save changes in the package test_creations_1.

Package-View

Save Button

When you are working inside an app, you will see these buttons appear:

Low-Code-Save-Button

If the application is not modifiable, the save button will appear greyed out.

Low-Code-Save-Button-Lock

If the application is not a Git-enabled application, both buttons will appear greyed out.

The Git button on the left opens the Git-Graph. From there, you can choose the version you want to modify.

There are two different save buttons:

Low-Code-Save-Button-2

  • Save: This will commit changes to the branch you are currently on. If you are in a detached head state (which means the commit you are on is not at the head of any branch), clicking this will open the "Save As" form.
  • Save As: This option allows you to commit changes to a new branch.

Low-Code-Save-Form

Enter a commit message and confirm.

Low-Code-Save-As-Form

For the "Save As" form, you need to enter a valid branch name. A message will inform you if the new branch name is authorized. You are free to set your own naming convention; the only restriction is to avoid spaces and special characters.

Low-Code-Save-As-Form-Filled

Once you have entered a valid branch name and a commit message, confirm the save and wait for the save confirmation message.

Saving Hierarchy

Changes are saved at the module level. This means that if you modify modules A and B, and then go to module A to save, only module A will be saved. If you have made several changes across different modules, it is recommended to go to the application's root view and save from there.

However, if you are working within module A and make multiple changes across several elements within that module, clicking the save button will save all changes made within the entire module.

Examples:

  • If you create ClassB in moduleB:

Low-Code-modB

  • And you also create ClassA in moduleA:

Low-Code-modA

If you hit the save button while you're in moduleA, only moduleA will be saved.

  • But if you go to the root of the test_creation_1 app and hit the save button:

Low-Code-Test-Creation1

This will save all modules and subpackages within the application.