How SAP Fiori Elements generates SAP Fiori apps

How SAP Fiori Elements generates SAP Fiori Apps

SAP Fiori Elements is a powerful framework that drama­ti­cally simplifies and accele­rates the development of SAP Fiori apps by automa­ti­cally generating the front end from metadata. But how exactly does this process work? Let’s take a look at the technical details.

The basis: OData services

The basic requi­rement for using SAP Fiori Elements is the existence of OData services that provide the data for the app. These OData services must support the OData V2 or V4 protocol. Other data sources are not supported. The OData services not only provide the data itself, but also contain metadata in the form of annota­tions that define attri­butes and relati­onships of the data.

Generation of the app at runtime

The central concept behind SAP Fiori Elements is the generation of an SAP Fiori app at runtime from an existing OData API with additional metadata (annota­tions). Not only the content of the application’s pages is generated by SAP Fiori Elements, but also the logic and behavior. This results in very little UI developmentas navigation, filtering, editing, saving, etc. are all handled by SAP Fiori Elements. By using the metadata from the OData services, SAP Fiori Elements can automa­ti­cally generate the entire app UI, including the layout, forms, lists, and other UI elements. Developers don’t have to worry about the details of UI imple­men­tation, but instead focus on providing the right metadata.

Annota­tions for custo­mization

Although the front end of the app is automa­ti­cally generated, developers can influence the appearance and behavior of the app by custo­mizing the annota­tions. The annota­tions can either be added directly to the data in the backend or overwritten in a local annotation file in the project. To make it easier to create and edit annota­tions, SAP offers the “SAP Fiori Tools”. These tools allow developers to create new SAP Fiori Elements appli­ca­tions or edit the annotation file using Guided Develo­p­ments. These guided develo­p­ments allow developers to walk through the steps required to implement a specific function­ality in the appli­cation and generate a code snippet that can be easily inserted into the code.

Technical requi­re­ments

Like any technology, SAP Fiori Elements also has some technical requi­re­ments:

  • Execution Environment: SAP Fiori Elements appli­ca­tions are web appli­ca­tions that run in a browser. Native iOS or Android Fiori Elements appli­ca­tions do not exist.
  • Data connection: The data source must support the OData V2 or V4 protocol. Other data sources are not supported. Offline use of the app is not supported.

Overall, SAP Fiori Elements offers an efficient and standar­dized way to develop SAP Fiori apps by automa­ti­cally generating the user interface from metadata. By reducing the amount of UI development required, developers can focus their attention on providing the right data and metadata instead of dealing with technical details of UI imple­men­tation.