Simultaneous Low-Code and Pro-Code - How Do We Achieve 100% Symmetry?

  • By Asanka Abeysinghe
  • 15 Jun, 2021

Low-code tools are widely used by development teams in many stages of the development lifecycle. Most low-code systems use a domain-specific language (DSL), which means the actual code that runs is generated based on the abstraction from the DSL—denoting that if the developer edits the generated code, the abstraction will be lost. It used to be a one-way process, where the developer always had to edit the program using the low-code editor, and not directly the code, which is painful and unproductive.

How is Choreo different?

Choreo takes a different approach by undeviatingly generating Ballerina code from the low-code editor, which is the actual code that runs once executed. The low-code editor in Choreo is the graphical representation of the code (Ballerina) syntax tree. This is a choice we made while designing Ballerina, and it is carefully supported. There are zero translations or abstractions between the code and the actual code runs. Considering there is no intermediary level and no translations, a developer can edit the generated code, and the graphical representation in the low-code editor will change accordingly.

The graphical representation in Choreo’s low-code editor uses the semantics of sequence diagrams and flow charts to represent the distributed programs coded or drawn for various use cases.

Sequence diagrams use three fundamental Ballerina language concepts to render the graphical representation of the code.

How textual and graphical parity works

The Ballerina language is designed to support graphical representation. The syntax tree of the language allows rendering the code into the sequence diagrams and flow chart notations. Let's look at the top-level language concepts and how the textual and graphical parity works.

  • Worker - Parallel execution in Ballerina is implemented using workers. In Ballerina, an execution thread is divided into multiple strands, and a worker represents a single strand of function execution. Workers are represented using vertical lines in the low-code editor.
  • Actions - Actions are an intermediate syntactic category between expressions and statements in the language. Horizontal lines in the Choreo low-code editor render using actions.
  • Client objects - These allow workers to send network messages that follow a specific protocol to a remote process or an endpoint. Choreo’s low-code editor represents target endpoints using an icon representing the particular egress system.

In addition to the above, Ballerina language constructs, such as statements, expressions, and variables, are displayed by using flowchart symbols in the low-code view.

While Ballerina is graphical friendly by design, the rendering process uses the language server protocol (LSP). LSP is a way to standardize and provide required additional metadata for language tools. In Choreo, the graphical low-code editor on the left and the textual pro-code editor on the right continuously communicate with the Ballerina language server using LSP, based on the edits that happen on either end to render the diagram or generate the code.

The Choreo platform stores the generated source file (.bal) in a git repo private for the user account. Users can clone the git repo, edit the Ballerina code using any IDE (e.g., VSCode), commit the changes, and merge to the same repo. Choreo will pick the updated code, display it in the graphical and textual editors, and use it with the build pipeline.

Extensions added to Choreo, which are developed using the Choreo programming model, will automatically be supported by the low-code editor. For example, the connectors developed using Ballerina and exposed with Open APIs will render without making any user interface changes to the editor. 

The way Choreo supports low-code and pro-code is unique due to the underlying Ballerina language. No other product or service provider can support this at the moment because WSO2 is the only vendor that provides a language for cloud-native programming and a platform for digital innovation at the same time.

Click here to find out more on how Choreo gives organizations a single, all-inclusive platform for creating integrations, services and APIs; managing APIs; and deploying services and APIs—going from ideas to production in hours.

Sign in to get started

An intelligent iPaaS that does not make you choose between code and low-code

Create your first Choreo App

This website uses cookies so that we can provide you with the best user experience. Read our Cookie Policy to find out more.

If you wish to disable cookies you can do so from your browser.

I Understand