Application Architecture

The four key players of the Equo Framework are:

  • Chromium for displaying web content.

  • Java for developing the backend application.

  • Equo Server for enabling and managing realtime, bi-directional communication between Java and Javascript, and vice versa.

  • Java and Javascript APIs for creating the application model and its parts smoothly, for working with the local filesystem and the operating system.

Developing a traditional Equo application is like building a web interface or building web pages, and seamlessly integrate them with a Java backend.

Main Processes

In an Equo application, the web pages are rendered in processes that are independent of the Java processes. That keeps the Java UI thread always responsive, as well as the web pages.

Communication between the web and the Java part is possible via the Comm API, this allows real-time bi-directional communication.

Structure of an Equo Application

Once the Equo application has been created with the CLI tool and the environment is ready, the next step is to start developing the application. You will need to import it in your favorite IDE.

Project Structure

An Equo application is just a Java application, so its project structure is the same as the one you will find in a traditional Java application.

├── pom.xml
└── src
    ├── main
    │   ├── resources
    │   │   └── index.html
    │   └── java
    │       └── equoapplication
    │           └──
    └── test
        └── java
            └── equoapplication

The src/main/java folder contains the Java code of your application and the starting class which builds and starts an Equo Application. It also contains your event handlers classes - this classes capture the events that you define in your Java classes or in the Javascript side of your application.

The src/main/resources folder contains all Javascript, css, images, and html files of your application. It can actually include a complete web application. In the Javascript files you can also define handlers which capture events that are triggered either from some other Javascript files or in the Java side of your app. In the same files you can add code to modify your existing web application (this happens in the case of a web wrapper application). New UI elements can be easily added to or removed from the existing web application, and they will only be shown in your desktop Equo application.

The handlers mentioned before, which exist in both the Java and the Javascript part of your application, are the endpoints of the Javascript - Java communication. That’s because the communication between the web side and the Java side is completely managed by the Equo Server component which lives inside the Equo framework. The Java-Javascript interaction and how to develop these handlers are described in the Bidirectional Communication section.

The generated application also contains a property file which can be used to define the configuration of you application. For example, the application branding can be defined in this properties file.

Java and Javascript APIs

The Java and the Javascript APIs were designed to make it easier to build Equo applications. Most of the Java APIs have their counterpart in the Javascript API, and vice versa. For example, you may create a Menu using the Java API or using the Javascript API.