What is Eclipse Dirigible?

Yordan Pavlov
Eclipse Dirigible
Published in
7 min readMay 7, 2020

Eclipse Dirigible™ is a Cloud Development Platform that provides development tools and a runtime environment. It supports the full development lifecycle of on-demand applications by leveraging an in-system programming model and rapid application development techniques.

Source: https://www.dirigible.io

Overview

Eclipse Dirigible is an open source project that provides development tools (Web IDE) and a Java-based runtime environment for building and running Business Applications in the Cloud. Dirigible provides the shortest possible turnaround time during application development and boosts the developers’ productivity with modeling tools, application templates, and an In-System development experience. You can find more about the project and even a hosted “Try it Out” version at: https://www.dirigible.io

Eclipse Dirigible Teaser

Pro-code vs Low-code

There are two major ways of building Business Applications nowadays — Pro-code and Low-Code/No-Code.

Pro-code refers to programming with high-level computer languages like C, C++, Java, etc. Here, the development happens from almost ground zero (excluding some libraries and frameworks like SpringBoot and others) and the development productivity is far from being fully utilized. It doesn’t mean that the developers are lazy, but rather that their time is spent mostly on writing boilerplate code (including copy-pasting it from previous projects), configuring and deploying their service in the cloud, mocking the productive environment locally and other not so productive tasks. On the other hand, thanks to cloud-native technologies like Kubernetes and Istio, developers are free to use all kind of programming languages to build microservices, which on its own in some extremes could lead to a lot of issues and troubleshooting.

The Low-Code/No-Code trend is not so new. It was officially named in 2014 by Forrester, but its roots can be traced back to the 1990s and early 2000s. It gained a lot of momentum in recent years together with the Cloud, PaaS, and SaaS trends.

A low-code development platform (LCDP) is software that provides a development environment used to create application software through graphical user interfaces and configuration instead of traditional hand-coded computer programming. A low-code model enables developers of varied experience levels to create applications using a visual user interface in combination with model-driven logic. Such platforms may produce entirely operational applications, or require additional coding for specific situations. Low-code development platforms reduce the amount of traditional hand coding, enabling accelerated delivery of business applications. A common benefit is that a wider range of people can contribute to the application’s development — not only those with formal programming skills. LCDPs can also lower the initial cost of setup, training, deployment and maintenance.

In essence, a Low-Code/No-Code platform “provides a development environment used to create applications through graphical user interfaces and configuration” and most importantly the Low-Code/No-Code platform “reduces the amount of traditional hand coding, enabling accelerated delivery of business applications”.

So to wrap up, Pro-code vs Low-code is actually the “flexibility” vs “productivity” dispute.

In-System development

Why is Pro-code vs Low-code important when it comes to Dirigible? Because Dirigible provides an environment and tools that enable both approaches simultaneously. Even more, the Pro-code and Low-code styles are complementary, well integrated and interchangeable in the Dirigible context. But first, let’s take a look at another core concept — In-System development.

If you have to describe Dirigible with a few words, these are “In-System development experience”. What does that mean? Stepping out of the software world and going to the hardware world, the concept of In-System programming was introduced around the 1970s with the first PIC microcontrollers.

In-system programming (ISP), also called in-circuit serial programming (ICSP), is the ability of some programmable logic devices, microcontrollers, and other embedded devices to be programmed while installed in a complete system, rather than requiring the chip to be programmed prior to installing it into the system. It allows firmware updates to be delivered to the on-chip memory of microcontrollers and related processors without requiring specialist programming circuitry on the circuit board, and simplifies design work.

Photo by Slejven Djurakovic on Unsplash

In essence, In-System programming is “to be programmed while installed in a complete system, rather than requiring to be programmed prior to installing it into the system”.

programmed while installed

vs

programmed prior to installing

Why is this even more important now in the software world than it was for the hardware world back in the day? With the complexity of a real-life business applications landscape, it becomes harder and harder to simulate (“mock”) all services and their behavior locally (e.g. security, persistency, scalability, integration with third-party services, etc.). Often it happens that what was developed and tested locally, doesn’t work that smoothly in the real “productive” environment. This leads to several development and deployment cycles, which in the end increases dramatically the “turnaround” time (the time from writing the code to the time of getting feedback how well it is working with other components of the system).

So how does the In-System development magic work on Dirigible? There are 3 steps:

  1. First, Dirigible has to be deployed in the target landscape — “programmed while installed”.
  2. Next, bindings to external services like Security, Database, Connectivity, etc., have to be configured — e.g. through environment variables.
  3. Finally, it’s time to write a “Hello World” application.

But how to do it without compilation and redeployment of the application artifacts? It’s easy, the target language for the Dirigible applications is JavaScript. But wasn’t Dirigible a runtime based on Java? How is it possible to execute a server-side JavaScript code from Java? Scripting for Java (or JSR 223) allows you to execute JavaScript code on the fly through various Java engines like Rhino, Nashorn, J2V8, or GraalJS.

Here’s how a “Hello World” application looks like in Dirigible:

Enterprise JavaScript APIs

To create a “Hello World” application, log in to your Dirigible instance, or use the “Try it Out” one at https://www.dirigible.io and follow these steps:

  1. Create a new project.
  2. Create a new JavaScript Service.
  3. Publish the project.
  4. Open the “helloWorld.js” file.
  5. See the result in the “Preview” tab.

To experience the power of In-System development, just change the “Hello World!” message and hit Ctrl+S/Cmd+S. The changes should be autopublished and the Preview tab should be refreshed with the updated response text.

response.println("Hello World from Medium.com!");

Okay, now let’s explore what other APIs are available beyond the http/v4/response one.

Dirigible comes with a set of predefined Enterprise JavaScript APIs.

  • http/v4/request — API for access to the headers and parameters that come as an input from the HTTP request
  • db/v4/database — API for standard access to the registered relational data sources
var database = require("db/v4/database");

var connection = database.getConnection();
...
var
statement = connection.prepareStatement("select * from Cars");
var resultSet = statement.executeQuery();
while (resultSet.next()) {
resultSet.getString("Brand"));
...
connection.close();
var base64 = require("utils/v4/base64");

var encodedValue = base64.encode("admin:admin");
var decodedValue = base64.decode("YWRtaW46YWRtaW4=");
  • bpm/v4/process — API for accessing and managing the BPM process within the underlying engine
  • core/v4/env — API for accessing the environment variables

You can find the complete list of APIs at: https://www.dirigible.io/api

If you want to learn how to provide your own Java-backed Enterprise JavaScript API together with a custom build of Dirigible, follow this tutorial.

Modeling Entities

Now that it’s clear that with the Pro-code approach, powered by In-System development experience and rich set of Enterprise JavaScript APIs, with Dirigible can be built sophisticated Business Applications, it’s time to take a look at the second part of the story — Low-code.

The majority of Business Applications consists of the following parts:

  • Persistency layer — access to several database tables and/or other types of persistence storage
  • REST APIs — support for Create/Read/Update/Delete operations
  • Administrative UI — overview and access to the business objects in the system
  • Extensibility — ability to extend the system/application, without touching the “core” modules
  • Jobs — scheduling tasks to be executed at some period of time
  • Integrations — some “glue” code for integration with third-party services
  • Processes — running BPMN processes

A large part of the above points is already covered by the Entity Data Modeler and the Business Process Modeler. You can find some samples here:

Generate Application from Model

Extensibility

As a major part of Business Applications, the Extensibility topic is well defined and integrated as a core component of Dirigible. As such, even Dirigible’s own Web IDE uses in the same way the concept of “extensions” and “extension points” as Business Applications should do.

Here is an example of how the “extensions” and the “extension points” are used in the Git Perspective of Dirigible’s Web IDE:

You can find the extensions concept here, as well as a list of all available system extension points and events.

Wrap-up

Dirigible has a fully-fledged Web IDE with:

  • Code Editor(s) — Monaco/Orion/Ace
  • Modeling Tools — Entity Data Modeler, Tables & Views Editors, Data Structures Modeler and others
  • Debugger — for debugging of server-side JavaScript services
  • Git Perspective — with Repositories, Staging and Diff views
  • Database Perspective — to explore and execute queries
  • Terminal
  • DevOps Tools
  • and many more

Dirigible also provides:

  • In-System development experience
  • Low-code support
  • Built-in and in-app extensibility
  • High quality core project as part of the Eclipse Foundation

--

--