cancel
Showing results for 
Search instead for 
Did you mean: 

Separating UI5 Application from Libraries

Former Member
0 Kudos

Hi Experts,

I am developing a SAPUI5 application in Eclipse with the UI5 Toolkit. It will be deployed to an SAP AS Java 7.4 using NWDS.

The problem I am facing is that after packaging the application as a WAR archive, the resulting archive is over 50mb big. Unfortunately, our corporate VPN connection doesn't handle this amount of data too well and deployment takes almost an hour each time, which makes the development process very cumbersome.

For this reason, I am trying to split out the UI5 libraries, which make up for the biggest part of the archive, and deploy them separately. I would like to only deploy the actual application each time and the libraries archive only once.

Are there any resources out there describing the steps necessary to achieve this? Any tips on what to take care of?

Thanks, Timo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Any ideas on how to solve this, anyone?

former_member182372
Active Contributor
0 Kudos

if you dont need app cach booster (defined as java servlet filter) you can delete all jars from war and reference library as

/sapui5/resources/sap-ui-core.js

Former Member
0 Kudos

Thanks, that actually solved my issue. By removing unnecessary libraries from the archive, I was able to bring down the size to a few kb.

Former Member
0 Kudos

Hi Timo,

I am also facing the same issue. Could you please let me know the steps to remove the unnecessary libraries from archive files.

I am exporting the UI5 application as WAR file and the file size is 33.5MB

Answers (2)

Answers (2)

Private_Member_15166
Active Contributor
0 Kudos

Hi,

Optimization of the Package Size

You can reduce the size further and optimize the content for a specific application by deleting additional files. The following list gives some examples:

  • You can delete one of the following files from the /resources folder depending on your setup: sap-ui-core-nojQuery.js if you reference SAPUI5 normally or sap-ui-core.js if you reference the nojQuery version and reference the jQuery version separately, for example if you run in a Sybase hybrid container.
  • You can delete all library folders if the respective control library is not needed. If you do not use charts, you can delete the complete makit andviz folder in /resources/sap. And in the OpenUI5 version you can, for example, delete the suite and the unified folder if you do not need them.
  • If you use the sap-ui-core.js file for bootstrap, you can delete the jquery and jqueryui folders in/resources/sap/ui/thirdparty. These files may be needed when you use the sap-ui-core-nojQuery.js script, but if you have another copy of jQuery available you can still delete the folder.
  • Depending on the theme you use, you can delete the base and either the sap_bluecrystal or the sap_mvi folders in each of the/resources/sap/* ... */themes
  • folders.

See this link.

SAPUI5 SDK - Demo Kit

former_member182372
Active Contributor
0 Kudos

not really relevant as there are no /resources folder in WAR just bunch of jars.

Private_Member_15166
Active Contributor
0 Kudos

Yes Maksim,

This is related to do the things before convering your projects to WAR files.

former_member182372
Active Contributor
0 Kudos

Well, there is no "converting", for java was it is web project by nature and sapui5 is delivered as set of jars,

e.g.

com.sap.apf.apf-lib_1.22.1.jar

com.sap.ca.scfld.md_1.22.1.jar

com.sap.ca.ui_1.22.1.jar

com.sap.collaboration.collaboration-commons_1.22.0.jar

com.sap.smartbusiness.suite.smartbusiness_1.22.0.jar

com.sap.suite.suite-ui-commons_1.22.0.jar

com.sap.ui5.commons_1.22.4.jar

com.sap.ui5.comp_1.22.4.jar

com.sap.ui5.core_1.22.4.jar

com.sap.ui5.layout_1.22.4.jar

com.sap.ui5.makit_1.22.4.jar

com.sap.ui5.mobile-ext_1.22.4.jar

com.sap.ui5.mobile_1.22.4.jar

com.sap.ui5.resource_1.22.4.jar

com.sap.ui5.richtexteditor_1.22.4.jar

com.sap.ui5.table_1.22.4.jar

com.sap.ui5.themelib_sap_bluecrystal_1.22.4.jar

com.sap.ui5.themelib_sap_goldreflection_1.22.4.jar

com.sap.ui5.themelib_sap_platinum_1.22.4.jar

com.sap.ui5.unified_1.22.4.jar

com.sap.ui5.utils_1.22.4.jar

com.sap.ui5.ux3_1.22.4.jar

com.sap.ui5.vbm_1.22.0.jar

com.sap.ui5.viz_1.22.4.jar

com.sap.ushell.ushell-lib-testresources_1.22.4.jar

com.sap.ushell.ushell-lib_1.22.4.jar

commons-io-2.4.jar

there is really no resources folder

Private_Member_15166
Active Contributor
0 Kudos

Yes there is no resources folder but there is JAVA resources and Javascript resources folders.

Whenever we build a project we load all SAPUI5 libraries. So that link is talking about that only.

We don't have to load all the libraries. We may only load what we need.

What do you say?

Am i right about my concept?

Dhananjay

former_member182372
Active Contributor
0 Kudos

for web develpoment for Java was eclipse is used

and

there is eclipse nature com.sap.ide.ui5.app.plugin.webappnature which deals with jars and include them into war.

saar_dagan
Employee
Employee
0 Kudos

Hi Timo,

NW 7.4 should already have UI5 SCA available out of the box and all you need to do is reference it.

using require (after you created the load script of UI5 of course).

Your WAR file should only contain your application JS files no stuff from UI5.

BR,

Saar

Former Member
0 Kudos

You are correct, the UI5 libraries are coming with NW 7.4 out of the box. As Maksim suggested, I was able to load the required libraries from the "/sapui5" context path.