Standard Bootstrap File
To use SAPUI5, you must load and initialize the SAPUI5 library.
The figure, Bootstrapping SAPUI5, shows a typical bootstrap script tag used to load the sap-ui-core.js file. When this script tag is included in a page, the SAPUI5 runtime will automatically be initialized as soon as the script is loaded and executed by the browser.
Note
If you run your application standalone, the bootstrap script is added to your HTML page. In an SAP Fiori launchpad environment, the launchpad executes the bootstrap and no additional HTML page is needed to display the application.SAPUI5 provides several bootstrap files for different use cases. sap-ui-core.js is the standard bootstrap file, which is recommended to use for typical use cases. It already contains jQuery, jquery-ui-position and only the minimum required parts of the core library (sap.ui.core).
Load Options
SAPUI5 can either be loaded locally with a relative path from an SAP Web server (see the figure, Bootstrapping SAPUI5) or externally from a Content Delivery Network (CDN).
You can point to a specific version in a CDN, which allows you to select a fixed version for bootstrapping. To do this, assign a versioned URL like the following to the src attribute in the bootstrap script:
1https://ui5.sap.com/1.96.16/resources/sap-ui-core.js
Alternatively, you can use the default version of the SAPUI5 libraries which has the following generic URL:
1https://ui5.sap.com/resources/sap-ui-core.js
Caution
The default version is constantly being upgraded and this might have an impact on the stability of your application. Use this version for testing purposes only.Configuration Options
The SAPUI5 runtime can be configured using so-called configuration options. The complete list of configuration options available in SAPUI5 can be found in the API Reference in the Demo Kit under sap.ui.core.Configuration.
SAPUI5 supports different possibilities to provide values for the available configuration options. Among other things, configuration options can be set via the bootstrap script tag. For this purpose, attributes are added to the script tag whose names are composed of the name of the respective configuration option and the prefix data-sap-ui-.
Let's look at some of these configuration options.