Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
pmuessig
Advisor
Advisor


Dear users of SAPUI5,

as of today (July 30th 2015) applications will have the opportunity to refer to specific versions of SAPUI5 from SAP HANA Cloud Platform (HCP). With this feature applications can now control themselves to switch to a different version of SAPUI5 based on their release and upgrade schedule.

The following snippet shows the current way of referring to UI5 on HCP:
<script id="sap-ui-bootstrap"
type="text/javascript"
src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-libs="sap.m"></script>

This will refer to the latest available version of UI5 on HCP. This version is controlled by the SAPUI5 team and will be normally updated in bi-weekly cycles with each HCP delivery. As this is a dynamic version it is not recommended to use this for applications. For testing purposes and for e.g. JSBin code snippets it is helpful because you can validate fixes later on once the update is available with that dynamic version.

If you want to use a specific version of UI5 you will be able to add the version as segment into the path of the bootstrap script tag:
<script id="sap-ui-bootstrap"
type="text/javascript"
src="https://sapui5.hana.ondemand.com/1.28.9/resources/sap-ui-core.js"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-libs="sap.m"></script>

This will load the specific version from HCP. This version is static and will not be changed anymore.

The difference in the URLs is a version segment between the host part and the resources segment:

  • dynamic - always the latest version


https://sapui5.hana.ondemand.com/resources/sap-ui-core.js


  • static - specific version - here: 1.28.9


https://sapui5.hana.ondemand.com/1.28.9/resources/sap-ui-core.js

In addition cache control is different for dynamic and static resources. Whereas dynamic resources have a max-age of one week static resources have a max-age of 10 years. In both cases CORS (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) headers will be set so that you will be able to consume resources from the central location without any proxy in between.


Access-Control-Allow-Origin:*


Cache-Control:max-age=604800, public





Access-Control-Allow-Origin:*


Cache-Control:max-age=315360000, public



Another important aspect for SAPUI5 on HCP is the usage of Akamai (available since March 17th) to distribute static resources as close as possible to you. Static versions will automatically benefit of Akamai. More details about the Akamai enablement can be found here: http://scn.sap.com/community/developer-center/front-end/blog/2015/04/01/sapui5-is-now-delivered-via-....

If you are interested in the available versions of SAPUI5 on HCP you can have a look into the version overview. It lists the available versions and their maintenance status:




Enjoy and best regards,

Peter Muessig on behalf of the SAPUI5 team


 

FAQ:


QUESTION: I am getting a the error: No 'Access-Control-Allow-Origin' header is present on the requested resource.”

ANSWER: Do not attach custom headers (X-...) to all requests via e.g. jQuery.ajaxSetup. In case of CORS requests this leads to unwanted CORS preflight checks, which will harm the performance of your application and also is not supported by our AKAMAI CDN setup to prevent this issue.
25 Comments