SAP UI5 初学 ( 一 )、简介

一、SAP UI5特点

作为一个企业框架,SAPUI5 提供了许多强大的企业特性去支撑企业app开发。

SAPUI5的个性化的功能可以帮助你更简单的创建企业app,以下是SAPUI5提供的最重要的一些增值。

  • Consistent UX:

SAPUI5 enables the SAP Fiori design evolution towards a consistent user experience across SAP solution( and beyond )

SAPUI5在SAP解决方案中帮助SAP Fiori提供用户体验

  • Use anywhere:

SAPUI5 allows a single, responsive app implementation for all browsers, platforms, and devices。

SAPUI5能在所有的浏览器、平台和设备上实施单独的可响应的app。

  • Hundreds of enterprise UI elements:

SAPUI5 offers a rich set of UI elements to build professional user interfaces for an enterprise context while complying to product standards such as security and accessibility.

SAPUI5提供了丰富的UI元素,用于为企业环境构建专业的用户界面,同时遵守安全性和访问性等产品标准

  • Easy to integrate:

SAPUI5 lets you run large numbers of highly-consistent apps that can be integrated to complex business processes of the SAP ecosystem.

SAPUI5允许您运行大量高度一致的应用程序,这些应用程序可以集成到SAP生态系统的复杂业务流程中。

  • Powerful extension options:

You can extend SAP standard apps and customize UIs without without any coding effort thanks to SAPUI5's integrated adaptation capabilities.

由于SAPUI5的集成适应能力,你不需要编码就可以拓展SAP标准app,以及自定义UI。

  • Flexible tools for any developer: 

SAPUI5在高效创建、测试和部署app方面提供了开发环境和工具,无论是亲代码还是低代码方面。

  • Benefit from innovation:

SAPUI5 brings a clear lifecycle separation of application and framework code to certrally innovate while be urgrade-compatible.

  SAPUI5为应用程序和框架带来了清晰的生命周期分离,以集中创新,和兼容升级。

  • Unlimited usage in SAP AND non-SAP:

SAPUI5 qualities are also available for non-SAP technology stacks and as open sources.

SAPUI5质量也可用于非sap技术栈或作为开放源码。

二、Compatibility Rules - 兼容性

The following sections describe what SAP can change in major, minor, and patch releases.

以下部分描述SAP在主要、次要和补丁版本中可以更改哪些内容。在使用SAPUI5开发应用程序、功能或控件时,一定要考虑这些规则。

永远不要使用或覆盖不属于API引用的“私有”函数。私有函数通常(但并不总是)以一个“_”作为前缀。一定要仔细检查API引用,这里没有列出私有函数。

API Evolution


除非另有说明,本节中的“API”指的是“公共API”,即函数、类、名称空间、控件及其声明的属性、聚合等。公共API的唯一定义是API参考,它包含在SAPUI5演示套件中。没有提到的特性不是API的一部分。

以下规则适用于引入新的api或对现有api进行不兼容的更改:

主要版本(x.y .zz):新的主要版本可以引入新的api或对现有api进行不兼容的更改。

次要版本(x.y .zz):新的次要版本可以引入新的api,但不能包含对任何api的不兼容更改。

补丁版本(x.y .zz):新的补丁版本只包含对现有实现的修复,但通常不包含新特性或不兼容的API更改。

这些规则可能有例外,但只有在非常紧急的情况下,如安全问题。此类异常记录在变更日志中。

Compatible Changes

以下对现有api的更改是兼容的,可以在任何时候进行:

添加新的库、控件、类、属性、函数或名称空间

一般化属性,即在继承层次中向上移动属性

向枚举类型添加新值;这意味着在处理enum属性时,总是要准备接受新值,例如,在对enum值做出反应时实现“默认”或“否则”路径。

Incompatible Changes

The following isn't part of the public API and may change in patch and minor releases:

以下对现有api的更改是不兼容的,但可以在新的主要版本中完成:

  • 重命名API(库、名称空间、函数、属性、控件、事件,等等)
  • 取消对参数的支持
  • 删除对配置项的支持
  • 降低API的可见性;这不会破坏JavaScript应用程序,但会改变契约
  • 删除API签名中的参数或重新排序
  • 减小可接受的值范围,例如函数的参数
  • 扩大返回值(或属性)的值范围。例外:枚举
  • 在模块之间移动JavaScript构件(名称空间、函数、类)
  • 用前提条件检查替换断言
  • 在继承层次中向下移动属性(等等)
  • 修改enum值的名称
  • 更改默认值(属性、函数参数)
  • 重命名或删除文件

Inheritance

继承SAPUI5对象(例如,通过在现有控件上调用sap.ui.extend来添加自定义功能)可能会危及代码的可更新性。

当覆盖SAPUI5生命周期方法(如init, exit, onBeforeRendering, onAfterRendering)时,你必须确保父类实现被调用,例如:

MyClass.prototype.onAfterRendering = function() {
  SuperClass.prototype.onAfterRendering.apply(this);

  // do your additional stuff AFTER calling super class
}

SAP可能随时添加、删除或更改父类的内部实现。特别是,你不应该依赖以下功能:

  • 不属于公共API的内部结构和方法
  • 没有在公共API中反映的对象的任何内部逻辑和行为
  • 对象的父层次结构,特别是对于API父对象不同于实际父对象的复合对象(例如父对象>内部对象>子对象)。更多信息请参见API参考:sap.ui.base.ManagedObject。
  • 控件的所有呈现功能,包括HTML结构和CSS类
  • 与SAPUI5结构和方法的命名冲突。SAPUI5可能会在以后引入新的API或内部结构,与你的实现相冲突。为了避免冲突,可以应用一个自定义前缀。不要使用以sap.m开头的名称空间。*或sap.ui。*在你的应用中。
  • 我们建议您在更新SAPUI5之后非常仔细地测试继承类,以确保扩展功能仍然按预期工作。

Deprecation

如果可能并且适当,我们将旧的工件标记为已弃用的,并创建新的工件,而不是进行不兼容的更改。相应的API文档中的弃用注释,可能还有实现中的日志条目,解释了为什么以及何时弃用工件,并包括关于如何在不使用弃用功能的情况下获得相同结果的提示。 

Experimental API

当前SAPUI5版本提供的一些特性或控件被标记为“实验性”。这些实验性的特性和控制并不是SAPUI5版本发布范围的一部分。不要在生产环境中使用实验性特性或控件,也不要使用没有充分备份的数据。

实验特性和控制可以在任何时候更改或删除,而不需要通知,也不需要正式的弃用过程。它们也可能与升级中提供的更改不兼容。

Third-Party Open Source Libraries

SAPUI5包含并使用了几个第三方开源库,比如jQuery。这些库也可以被应用程序和/或自定义控件库使用,但本文档中描述的SAPUI5兼容性规则不适用于这些第三方库。

如果您想使用SAPUI5中包含的第三方开源库,请注意以下限制:

  • SAP决定提供所使用的库的哪些版本和模块。
  • SAP甚至可以在补丁版本中升级到所使用的库的更高版本。
  • 如果我们更改一个库的新默认版本,我们将记录我们的发现,这可能会对SAPUI5应用程序产生影响(参见升级)。如果有必要,请确保调整代码!
  • 出于安全等重要原因,SAPUI5可以在任何时候停止提供库。
  • 第三方库是“按原样”提供的。SAP不执行或提供扩展、适配和支持。

请注意

不要使用这些库的不同版本,因为这可能会导致不可预见的副作用。

SAPUI5使用的第三方开源软件列表,请选择“更多信息→关于”,并选择“包含的第三方软件”链接。

Related information

三、Browser and Platform Support - 浏览器和平台支持

Browser and platform support for the SAPUI5 libraries on iOS, Android, macOS, and Windows platforms.

请注意

关于受支持的浏览器和平台的唯一真实来源是产品可用性矩阵(PAM),您可以在SAP站点上发布的https://support.sap.com/pamInformation上找到它。SAPUI5不是它自己的产品,所以请检查你使用SAPUI5的产品的PAM。有关更多信息,请参阅SAP注1716423。

以下部分仅以汇总的形式包含关于特定SAPUI5库的限制和平台支持信息的附加信息。

由于SAPUI5基于CSS3、HTML5和ECMAScript 5 (ES5) JavaScript API,所以只支持具有HTML5功能的浏览器。一般来说,SAPUI5框架只能支持相应平台也支持的主要版本。

限制

我们目前不保证ECMAScript标准ES6/ES2015或更新版本与SAPUI5兼容。

根据您的SAPUI5应用程序运行的平台,支持不同版本的不同浏览器。如果你知道你的用户使用哪个平台和哪个浏览器,你就可以决定为你的应用程序使用哪些库。

Overview of Supported Browsers, Platforms, and Reference Devices

Browser and Platform Support Matrix

PlatformDevice CategoryPlatform VersionSafariWeb ViewMicrosoft Edge (Chromium)2Google ChromeMozilla FirefoxSAP Fiori Client
Windows1DesktopWindows 8.1--Latest versionLatest versionLatest version and latest Extended Support Release (ESR)7-

Windows 10

Windows 11

-Latest version-
Touch5, 6

Windows 10

Windows 11

-Latest versionLatest version7Latest version7Latest version
macOSDesktopLatest 2 versionsLatest 2 versions--Latest version5--
iOS & iPadOS3Phone and Tablet5, 6Latest 2 versionsLatest 2 versionsLatest version7---Latest version
Android4Phone and Tablet5, 6Latest 3 versions supported by Google---Latest version-Latest version

1) The specified browsers are also supported in virtual environments, such as Citrix and VMware. Any issues found must be reproducible in a non-virtualized environment.
2) SAPUI5 detects Microsoft Edge (Chromium) as Google Chrome and treats it the same.
3) We use current Apple iPhone and iPad devices for testing and reproducing the reported issues.
4) Android-based devices are very fragmented in matters of operating system variants and hardware diversity. We use current Samsung Galaxy S and Galaxy Tab S series devices for testing and reproducing the reported issues.
5) Not supported for sap.ui.commons and sap.ui.ux3.
6) Not supported for sap.gantt. Note that gantt charts consuming sap.gantt can be displayed on tablet devices.
7) Not supported for sap.ui.vbm.

Supported Library Combinations

SAPUI5 provides a set of JavaScript and CSS libraries, which can be combined in an application using the combinations that are supported.

In general, most library combinations are supported. However, restrictions apply for the following libraries:

  • sap.ui.commons (deprecated)

  • sap.ui.richtexteditor*

  • sap.ui.suite

  • sap.ui.ux3 (deprecated)

These libraries can only be used in combination with the following libraries:

  • sap.ui.core

  • sap.ui.layout

  • sap.ui.unified

  • sap.ui.table

  • sap.viz

*Combinations between sap.m and sap.ui.richtexteditor are allowed only for desktop apps. If your use case requires it and you have enabled the mobile theme, see the sap.ui.richtexteditor documentation.

Related information

 四、SAPUI5 vs. OpenUI5

在SAPUI5和OpenUI5中,我们提供了两种UI开发工具包。两者密切相关,但也有不同之处。

许可证

主要的区别是许可证。

OpenUI5是开源的,免费使用,在Apache 2.0许可下发布。由于我们也使用许多开源库,我们试图回报这个人情,也从世界各地开发人员的经验和知识中获益。

例如,SAPUI5集成在以下产品中:

  • SAP HANA
  • SAP业务技术平台
  • SAP NetWeaver 7.4或更高以及ABAP平台1809或更高(包含在UI技术(SAP_UI)组件中)
  • SAP NetWeaver Application Server 7.3x用户界面插件

最重要的是,包含所有核心功能和最常用的控制库的核心在两种版本中是相同的。(例如:sap.m, sap.ui。布局,sap.ui.unified)。

因此,OpenUI5还提供了构建功能丰富的Web应用程序所需的所有重要功能。

SAPUI5中的附加库在顶部包含了更多的控件,比如图表,SAPUI5还允许你使用“智能控件”,这是由OData注释从后端自动配置的控件。SAPUI5的确切功能范围也取决于您使用的平台。例如,您只能在SAP NetWeaver上使用ABAP存储库,而不能在SAP BTP上使用。

Contributing to OpenUI5

OpenUI5 is Open Source, and is available on GitHub正在上传…重新上传取消.

If you find a bug or have an idea for a new feature - just go ahead and propose a GitHub issue or a change. But before you do so, please just read our guidelines first: Contributing to OpenUI5正在上传…重新上传取消.

Resources

For the OpenUI5 version, visit http://openui5.org/正在上传…重新上传取消 where you can download the runtime and the Demo Kit (SDK) at http://openui5.org/download.html正在上传…重新上传取消.

For the SAPUI5 resources, check your platform installation.

Both resources are also available online via the content delivery network provider Akamai at https://openui5.hana.ondemand.com/ and https://ui5.sap.com/.

Compatibility of OpenUI5 and SAPUI5

Technically, you can switch between OpenUI5 and SAPUI5 (provided you have a product where SAPUI5 is included), for example, if you want to use the SAPUI5-specific features.

Just check first which SAPUI5 version you need, because the version numbers of OpenUI5 and SAPUI5 might differ on patch level (last number). You can find this information in the technical information dialog ( Ctrl Alt Shift P ).

If you're using the content delivery network, you can simply replace the bootstrapping reference to https://openui5.hana.ondemand.com/<1.xx.yy>/ with a reference to https://ui5.sap.com/<1.xx.zz>/. For more information, see Variant for Bootstrapping from Content Delivery Network.

For all other cases, replace the runtime. Since the technical names (of controls, libraries, etc.) and APIs are the same in both OpenUI5 and SAPUI5, the code will still work and you can start enhancing it directly.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值