当前位置:网站首页>What is hybrid web containers for SAP ui5
What is hybrid web containers for SAP ui5
2022-07-02 02:56:00 【Wang Zixi】
We can develop mobile applications to include native application wrappers ( for example PhoneGap), And... For displaying content on the user interface HTML Viewer's hybrid application (Hybrid Web Container).
The advantage of hybrid apps is that they can be published in the app store . Besides , By combining application code with SAP UI5 The library file is embedded in the mixing container , Users only need to install the file once , There is no need to download... Every time you start the application .
But the size of the library becomes very important , Because every user must install files , And in the Web In the application , The library is deployed on the server , Users only need to download the required part of the library at run time .
To include the required resources in a hybrid application , You can use static mobile runtime packages openui5-runtime-mobile*.zip. The package is not included in SAP UI5 in , It's contained in Open source version OpenUI5 in .
The library size of these packages is quite small , Because the most likely unwanted content has been deleted , For example, test page . One package Contains all the JavaScript Debug version of the file and optimized and minimized version . therefore , Packages can be used for production and debugging purposes . In the application wrapper ( for example PhoneGap) Use this package in , Please extract the package to the corresponding resource location of the application development project . then , The application wrapper builds the include file and makes it available at run time .
In order to control the size of the package file , It contains only the most likely control Libraries , Not all control Libraries . Depending on the hybrid application , You may need to add libraries by copying them from the appropriate folder at run time , Or delete the library to reduce the package size , This reduces the user's installation size .
This file contains the following control libraries :
sap.f
sap.m
sap.tnt
sap.ui.core
sap.ui.layout
sap.ui.suite
sap.ui.unified
sap.uxap
There may be no absolute objective criteria for deciding which libraries to include or not to include . It is based only on rules of thumb , And many applications need to be tuned anyway .
Besides , Move / Hybrid packages do not include certain types of files that are not normally required . The actual application situation of each customer may be different , Therefore, it is necessary to add corresponding files according to the requirements of specific applications . Originally SAP UI5 Designed in the application library-preload.js, Contains the library All the controls in . Use this file to load the library , Can reduce the HTTP Number of requests .
however SAP UI5 Of Hybrid Web Containers No longer need library-preload.js file , Because in the execution environment of hybrid applications, the library files are loaded locally , There is nothing HTTP Delay .SAPUI5 By default, you will try to access them , Your developer may see these files fail to load in the log . however , These error messages have no effect , You can declare that such a file does not exist and SAPUI5 Set the following configuration in the boot script tag to eliminate them :
data-sap-ui-preload=""
package Size optimization
Although the static package is small enough , Can be included in hybrid applications , But you can still further reduce the size and optimize the content of a particular application by deleting other files . The following list provides some examples :
If you don't need the corresponding control library , You can delete all library folders . for example , stay OpenUI5 Version can be deleted
suiteandunifiedFolder .At every /resources/sap/* … */themes In the folder , You can delete all theme folders , Except for the theme folder in use .
device ready event
blend Web The container takes some time to initialize . in the meantime ,AJAX The sending of the request is blocked , This means that once sent AJAX request ,JavaScript The code will stop , Code execution will also stop . This can lead to UI be in freeze state .
SAPUI5 Medium OData The model is used internally AJAX request , Therefore, it must be carried out after the mixing container is ready OData Model initialization , To avoid freezing the user interface . After the initialization , blend Web The container triggers a device ready event . for fear of UI freeze, Please create OData Model and related code for model binding , Moved to device ready In the event listener .
Example :
<!-- put the following code in the beginning of the application code -->
function appReady(){
sap.ui.getCore().setModel(new sap.ui.model.odata.v2.ODataModel(<ODATA_URL>));
}
<!-- bind to the deviceready event -->
document.addEventListener("deviceready", appReady, false);
</script>
Cross domain restrictions (Cross Domain Restrictions)
If you use AJAX Load data from an external server or service , Must be mixed Web Configure external domain in container , In order to make AJAX Requests are restricted across domains .
边栏推荐
- How does proxy IP participate in the direct battle between web crawlers and anti crawlers
- 批量检测url是否存在cdn—高准确率
- Questions d'entrevue
- 2022 safety officer-c certificate examination questions and mock examination
- Summary of some experiences in the process of R & D platform splitting
- Unit · elementary C # learning notes
- Delphi xe10.4 installing alphacontrols15.12
- C # use system data. The split mixed mode assembly is generated for the "v2.0.50727" version of the runtime, and it cannot be loaded in the 4.0 runtime without configuring other information
- [JVM] detailed description of the process of creating objects
- Soul app released the annual report on generation Z behavior: nearly 20% of young people love shopping in the vegetable market
猜你喜欢
![[staff] pitch representation (treble clef | C3 60 ~ B3 71 pitch representation | C4 72 pitch representation | C5 84 pitch representation)](/img/e0/05890eafdb291c5aaff78cc241f455.jpg)
[staff] pitch representation (treble clef | C3 60 ~ B3 71 pitch representation | C4 72 pitch representation | C5 84 pitch representation)

QT实现界面跳转

SAP ui5 beginner tutorial 19 - SAP ui5 data types and complex data binding

CVPR 2022 | 大连理工提出自校准照明框架,用于现实场景的微光图像增强

Start a business

2022-2028 global human internal visualization system industry research and trend analysis report

图扑软件通过 CMMI5 级认证!| 国际软件领域高权威高等级认证

Mmsegmentation series training and reasoning their own data set (3)

Tupu software has passed CMMI5 certification| High authority and high-level certification in the international software field
![[JVM] detailed description of the process of creating objects](/img/6e/0803b6b63c48337985faae8d5cbe1a.png)
[JVM] detailed description of the process of creating objects
随机推荐
結婚後
How to run oddish successfully from 0?
Coordinatorlayout + tablayout + viewpager2 (there is another recyclerview nested inside), and the sliding conflict of recyclerview is solved
Rotating frame target detection mmrotate v0.3.1 learning model
AcWing 245. Can you answer these questions (line segment tree)
Force deduction daily question 540 A single element in an ordered array
Which brand of sports headset is better? Bluetooth headset suitable for sports
Delphi xe10.4 installing alphacontrols15.12
Batch detect whether there is CDN in URL - high accuracy
Set status bar color
Formatting logic of SAP ui5 currency amount display
Cache processing scheme in high concurrency scenario
Share the basic knowledge of a common Hongmeng application
How to develop digital collections? How to develop your own digital collections
超图iServer rest服务之feature查询
QT uses sqllite
Systemserver service and servicemanager service analysis
Kibana操控ES
Tupu software has passed CMMI5 certification| High authority and high-level certification in the international software field
LeetCode刷题(十)——顺序刷题46至50