Visual programming languages

Tersus

With the previously presented tools, developers just pointed and clicked to compose a flowchart of individual commands; even the object-oriented programming in Alice basically used an imperative style. Tersus [11], on the other hand, focuses on data flow. In the Eclipse-based development environment, a palette on the right offers functions to manipulating numbers, text, or lists. If you drop a function onto the canvas, it appears as a box with inputs and outputs. The box for multiplication, for example, has two inputs (for the two numbers to be multiplied) and one output for the result. When you connect these inputs and outputs to the inputs and outputs of other functions, the result is a data flow diagram as shown in Figure 7, and you can nest these diagrams to assemble complex computations from smaller units.

Figure 7: Tersus works with data flow diagrams. This one computes the factorial of the number pushed in on the left.

Tersus converts the finished program into a web application and serves it up with its own Tersus server. The functions and operations offered in the palette primarily cover the needs of web developers. Among other things, it supplies links to databases and functions for authentication and key generation.

Input and output is handled by forms (views) whose parts are again composed by point and click. The principle of nesting applies here as well: If you want two input fields to appear adjacent on a page, you first need to locate an element for a row on the form and then locate the two fields in the row. Tersus draws the input fields as simple rectangles. If you want to see the results, you need to complete and build the whole program.

Tersus is released under the GPLv2, but its vendor, Tersus Software Ltd., also offers a commercial version with links to commercial databases such as Oracle and enhanced support for MS Office files.

Diagrams as a Benefit

Tersus mainly uses tools for signal processing, as well as data flowcharts for music and multimedia programs. For example, if you use the GNU Radio Companion [12], you can drag the components of a sine wave generator from a palette into the drawing area and connect its output to the input of the audio output component, which you likewise drag from the palette. You can then change and convert signals (Figure 8) using other blocks.

Figure 8: This structure in the GNU Radio Companion simulates a dial tone.

With the help of the Pure Data (PD) [13] tool, users can use this approach to run sounds through several processing stages, as well as process video and multimedia data. Graphic artists also use graphic data flow diagrams [14] in the 3D Blender program to postprocess the rendered images. To do so, they link compositing nodes.

Lava

The graphical programming language Lava [15] was created in 2001 at the Fraunhofer Institute [16] for secure information technology; now, other developers continue to maintain the project. Similar to Drakon, the programming language is Lava, whereas the development environment has the name Lava Programming Environment, or Lava PE for short. Its complete source code is available under the GPLv2.

The object-oriented Lava uses a slightly different approach than the previously mentioned graphical programming languages: To start, you use a wizard to create the classes you need in your program. Lava PE displays these in a hierarchy (Figure 9). Related classes can be combined to create packages, as in Java.

Figure 9: Lava PE displays the classes, methods, and properties in a hierarchy.

To implement the methods of the classes, you then need to change to the text editor. In the editor, you do not need to type in the source code manually; rather, you point and click to compose the instructions from various palettes. Lava PE automatically ensures that only syntactically correct statements are produced. For example, if you use the palette with the control structures to create a foreach loop, a wildcard appears in place of the termination condition and the loop body (Figure 10).

Figure 10: Lava uses placeholders to ensure syntactically correct statements.

You can then replace these placeholders by pointing and clicking again. Depending on the currently selected placeholder, the palettes and combo boxes only offer statements, variables, and objects that you can use in the current situation.

The development environment itself is a little awkward to use. The myriad of meaningless symbols is overkill and, in turn, complicates the work and wastes time. On the positive side, you have the benefit of object-oriented programming, which means you can derive classes and use a signal/slot concept similar to that in Qt. Additionally, Lava PE offers native functions for refactoring.

The finished program is run by an interpreter named Lava. Lava PE provides a debugger to set breakpoints. When this issue went to press, the current 0.9.4 version was only available as source code and required Qt 5.1.1, which in turn is only included in more recent distributions. Documentation is based on examples, which is not only incomplete but also well hidden on the website [17].

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News