Patch-Level Independent Bootstrapping for UI5 Applications

Vladimir Balko
2 min readOct 3, 2023

--

Patch-level independent bootstrapping ensures your UI5 application remains compatible across different patch versions of the UI5 library. This guide outlines the steps for both standalone UI5 applications and those hosted in SAP Workzone.

Standalone UI5 Applications:

Select a Long-term Maintenance Version:

Choose version 1.108 as the long-term maintenance version from the version overview of SAPUI5 or OpenUI5.

Modify Bootstrap Script Tag:

In the bootstrap script tag, refer to the major.minor version (1.108) instead of major.minor.patch.

<script id="sap-ui-bootstrap"
type="text/javascript"
src="https://ui5.sap.com/1.108/resources/sap-ui-core.js"
data-sap-ui-theme="sap_fiori_3"
data-sap-ui-async="true"
data-sap-ui-onInit="module:sap/ui/core/ComponentSupport"
data-sap-ui-libs="sap.m">
</script>

Declare Component:

Declare the component via a <div> tag in the <body> of the HTML page.

<div data-sap-ui-component
data-name="my.app"
data-settings='{ "id": "myRootComponent" }'
>
</div>

Ensure Asynchronous Loading:

The bootstrap script requires asynchronous loading by adding the async attribute to your bootstrap script.

Hosted in SAP Workzone:

Prepare Your Application:

Make sure your application is ready and hosted on a server accessible by SAP Workzone.

Add Application to SAP Workzone:

Follow the tutorial to add an SAPUI5 app to a workpage in your site.

Configure Automatic Patch Updates:

For automatic patch updates, use the x-range format for the patch level in the manifest.json file of the application.

{
"sap.ui5": {
"dependencies": {
"minUI5Version": "1.108.x",
"libs": {
"sap.m": {}
}
}
}
}

This guide aims to provide a high-level approach to achieving patch-level independent bootstrapping for UI5 applications, in both standalone and hosted environments.

--

--