Developer resources
- Qworum specification: The target audience for this specification are the developers of Qworum applications and services.
- Application template (GitHub). A simple versioned multi-language template for Qworum-based web applications/APIs.
- JavaScript library for web pages (GitHub): ES6 module for using the advanced Qworum capabilities of web browsers.
- Application template #2 (GitHub). In this project, the Qworum API/application uses semantic data instead of JSON. A great starting point for projects wishing to leverage Semantic Web technologies.
- Some Object-Semantic Mapping models (GitHub). OSM is similar to ORM, except that it is for semantic data. This project contains a couple of OSM models for Qworum applications.
- Demo project (GitHub): Contains the code base for a Qworum-based distributed web application.
- Other demos: Here are some integration tests for the Qworum browser extension.
- Visual Studio Code extension on Visual Studio Marketplace: Provides XML code snippets for writing static Qworum scripts.
- Email address for support.
- Google group: Visit this group for feature requests, bug reports and general discussion.
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. 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.Transforming web applications into Qworum services
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:
// Adds an article to a shopping cart on an e-commerce website.
// (The end-user is on an article details page.)
import { Qworum } from "https://esm.sh/gh/doga/qworum-for-web-pages@1.5.7/mod.mjs";
const
// Sample article details.
article = {
"id" : "8b1d5802",
"title": "Classic ankle boots",
"price": {"EUR": 29.99}
},
// Create a Qworum script.
addToCartScript = Qworum.Script(
Qworum.Sequence(
// Add the article to the shopping cart ...
// (Redirects the end-user to the remote shopping cart service.)
Qworum.Call(
['@', 'shopping cart'], 'https://shopping-cart.example/add-article/',
{
name : 'article',
value: Qworum.Json({article})
}
),
// ... then go back to the article details page on the e-commerce site.
Qworum.Goto('index.html')
)
),
addToCartButton = document.getElementById('add-to-cart-button');
// Execute the Qworum script when the user clicks on the add-to-cart button.
addToCartButton.addEventListener('click', async () => {
// Add the article to the visitor's shopping cart.
await Qworum.eval(addToCartScript);
});
Local development
The Qworum browser extension is enabled for local development by default. The web origins that are enabled for local development are:
http://localhost:8080
,http://27.0.0.1:8080
(the TCP port 8080 is often used in the Java world)http://localhost:3000
,http://27.0.0.1:3000
(port 3000 is often used in Deno or Node.js projects)http://localhost:5500
,http://27.0.0.1:5500
(5500 is the default port for VS Code's Live Server extension)http://localhost:5501
,http://27.0.0.1:5501
(alternative Live Server port)http://localhost:5502
,http://27.0.0.1:5502
(alternative Live Server port)