Strategies for HTML/JavaScript Desktop Applications

The industry standard for HTML/JavaScript packaging into native applications today is Electron. Unfortunately, Electron (by default) bundles both Node.js as well as a copy of Chromium. This results in applications that are relatively large in terms of both "Hello World" installs (100+mb) and memory footprint.


As an alternative, the Java VM can now be packaged as a slim (~20-30mb) installer. Instead of using Node.js as the backend, it's now possible to use a light-weight Java VM as the underpinning of a native HTML/JavaScript application instead of Electron.


In this scenario, Java REST endpoints are used for the native integration. This allows for a much simpler interfaces than the Node.js integration. It also makes the interactions between the "server" (written in Java) and the "client" written in JavaScript much easier to understand, with less ambiguity around execution paths.

Zadt offers a pre-built templates for HTML/JavaScript developers. The templates assumes no knowledge of Java at all - simply install the Java runtime and Maven and you ready to get started. Placing HTML, CSS, and JavaScript assets into the the static directory and a few simple commands and you've got a nice, native application, complete with macOS .dmg and Windows .msi installers. The templates include pre-built interfaces for local callbacks.

Three templates are offered - a slim desktop application that relies on the user's default browser, a slim system tray application that relies on the user's default browser, and a desktop application that relies on the JavaFX WebKit-based browser to offer a much closer to native experience. This final template is much closer to the Electron development model, as the bundled WebKit browser brings a Hello World installation up to closer to 40-50mb.

All of these templates include support for Zadt automatic updates, crash reporting, and analytics!


1 view0 comments

Sign Up Today!

Get free access to technical documentation, getting started, and more! No spam, cancel anytime.

Zadt is a software solution provided by Double Robot

© 2020 Double Robot