Developer resources

Downloads

Developing with Qworum

Qworum services must not add new entries to browser tab histories. To ensure this, Qworum applications must be launched by clicking on a link in another tab, such as this one.

This constraint is needed because being able to use the browser's forward/backward buttons can cause the Qworum session state to go out of sync with the UI that the end-user sees.

Qworum allows for unbounded nesting levels
Qworum applications vs other web applications

Transforming web applications into Qworum services

As a developer, you have the option of leaving your non-Qworum application unchanged and providing a separate Qworum API for calling third-party services and being called by them.

Alternatively, you can transform your Web application into a Qworum application and, even better, develop a Qworum application from scratch.

Transforming any Web application into a valid Qworum application is a simple matter of making sure that the application does not add new entries to the browser's tab history.

At this point your application will have become a valid Qworum API consisting of one endpoint.

You can then factor out parts of your monolithic application into separate endpoints.

Through refactoring you will then be able to build complex user flows by orchestrating these endpoints.

Refactoring also will allow you to make parts of your user flows available to third-party applications.

Easy-to-use JavaScript library for developers

In order to use Qworum, web pages need a special JavaScript library that gives access to the Qworum capabilities of browsers. This library is freely available on a JavaScript CDN. Here is how this works:

// Add an article to a shopping cart.
import { QworumScript, Qworum } from 'https://esm.sh/gh/doga/qworum-for-web-pages@1.7.0/mod.mjs';

const
Script   = QworumScript.Script.build,
Sequence = QworumScript.Sequence.build,
Call     = QworumScript.Call.build,
Goto     = QworumScript.Goto.build,
Json     = QworumScript.Json.build,
article  = {
  "id"   : "8b1d5802",
  "title": "Classic ankle boots",
  "price": {"EUR": 29.99}
},
script = Script(
  Sequence(
    Call(
      ['@', 'shopping cart'], 'https://shopping-cart.example/add-article/',
      {name : 'article', value: Json({article})}
    ),
    Goto('index.html')
  )
),
button = document.getElementById('add-to-cart-button');

button.addEventListener('click', async () => {
  await Qworum.eval(script);
});

Local development

The Qworum browser extension is enabled for local development by default. The web origins that are enabled for local development are: