SAP Fiori elements provide designs for UI patterns and predefined templates for common application use cases.
SAP Fiori Elements 提供了預定義的模板和 UI 樣式,適用於 SAP 應用的通用應用場合。
App developers can use SAP Fiori elements to create SAP Fiori applications based on OData services and annotations that don't need JavaScript UI coding.
使用 SAP Fiori Elements,應用開發人員可以建立基於 OData 服務和註解的 Fiori 應用,而無需額外的 JavaScript 程式設計。
The resulting app uses predefined views and controllers that are provided centrally.
Fiori Elements 應用使用的檢視和控制器,都是 SAP UI5 框架統一提供的。這些統一的檢視,控制器,component.js, 如下圖所示:
This means no application-specific view instances are required.
這種設計意味著無需應用層面的檢視例項了。
The SAPUI5 runtime interprets metadata and annotations of the underlying OData service and uses the corresponding views for the SAP Fiori app at startup.
執行時,SAP UI5 解析 OData 服務和註解中包含的後設資料,將其同業務資料一起,使用框架統一提供的檢視來渲染頁面。
為什麼要使用 SAP Fiori Elements?
- High development efficiency to cover what 80% of all apps need
開發效率高,Fiori Elements 提供的模板,能涵蓋 80% 的應用需求。
You do not need to build the UI over and over again. Just reuse the common features required by most applications. They are provided by the SAP Fiori elements floorplans.
應用開發人員無需一次又一次地重複建立相似的 UI,而是直接重用 SAP Fiori Elements 為大多數應用提供的可重用模板即可。
- Design consistency
Predefined floorplans, views, and controllers ensure UI consistency within and across similar apps.
因為每個 SAP Fiori Elements 應用,使用的都是統一的 floorplans,views,和控制器,這樣保證了 UI 介面的高度一致性。
Apps created using SAP Fiori elements are kept up-to-date as they are automatically adapted to the most recent design guidelines.
基於 SAP Fiori Elements 的應用,因為使用的是 SAP UI5 統一提供的模板,這些模板由 SAP 管理,總能保證符合最新的設計準則。
- Decoupling of UI and business logic
UI 和業務邏輯的解耦合。
The metadata-driven development model uses semantic annotations and significantly reduces the amount of front-end code. Developers can focus on the business logic.
SAP Fiori Elements 採取後設資料驅動的開發模式,使用語義化註解,從而極大減少了前端程式碼的規模。開發者可以專注於業務邏輯的設計和實現。
To extend your apps, use SAP Web IDE 1.17 or higher.
如果想擴充套件 SAP Fiori Elements 應用,需要使用 Web IDE 1.17 之上的版本。
The OData service models (entity sets and entity types) are derived from CDS views.
OData 服務的模型(entity sets 和 entity types) 源於CDS view.
The CDS entities are the primary artifacts for the data model.
CDS view 是 SAP Fiori Elements 應用資料模型的首要資源。
Transactional runtime model (based on the BOPF) is generated based on annotations.
基於 BOPF 的事務性執行時模型,基於 annotation 自動生成。
The UI annotations are attached to CDS views using the tags as defined in the SAP - ABAP Programming Model for SAP Fiori guide in the documentation for your SAP NetWeaver version on SAP Help Portal at https://help.sap.com/viewer/p...
UI 註解使用 SAP Fiori ABAP 程式設計模型裡定義的 tag,附加到 CDS view 上。
Here, the annotations are read using the catalog service of SAP Gateway. This is the standard method when using the auto-exposure feature of the application infrastructure.
使用 SAP Gateway 的 catalog service 讀取註解。
The local resources localService/metadata.xml and localService/SEPMRA_PROD_MAN_ANNO_MDL.xml are generated for local tests that want to simulate back-end access.
下列資源是為了本地測試而建立的,用於模擬後臺返回的結果。
- localService/metadata.xml
- localService/SEPMRA_PROD_MAN_ANNO_MDL.xml
Besides the annotations that are retrieved from the back-end system, the local resource annotations.xml plays a role at runtime, as this file contains the facet descriptions for the object page. This is where you have to maintain the labels for the different facets.