Show TOC

Standard Variant for BootstrappingLocate this document in the navigation structure

The standard variant for bootstrapping supports the most common use case: It is a self-contained variant where you include the sap-ui-core.js file in your HTML page.

The standard variant already contains jQuery as well as some jQuery plugins. An application only has to specify the sap-ui-core.js file on its page and SAPUI5 runtime does the rest automatically. The following code snippet shows an example:

	<script 
            id="sap-ui-bootstrap"            
            src="resources/sap-ui-core.js" 
            data-sap-ui-libs="sap.ui.commons"
            data-sap-ui-theme="sap_bluecrystal" >
    </script>

SAPUI5 synchronously loads the libraries specified in the data-sap-ui-libs configuration option. If a library requires a library that is not specified in the configuration, SAPUI5 loads this library automatically. You use the data-sap-ui-theme configuration option to specify the style sheet you want to load for all libraries.

Subsequent to the bootstrap script tag, an application can call most of the SAPUI5 APIs. The application can access the core APIs, or instantiate, configure, and place controls. The document object model (DOM), however, can only be accessed after the controls have been rendered, that is, only after the document is ready. The application can use the attachInitEvent method to be notified about that event.

Note In the default configuration, SAPUI5 automatically activates the preload=sync mode when running from optimized sources. For more information, see Preload Variant for Bootstrapping.