Introduction to Smart Controls
Occasionally, implementing SAPUI5 applications can become a repetitive task. Some applications may have a different use case and OData service but have exactly the same UI. Moreover, a lot of metadata comes with the backend OData service, for example, internationalization or field length, and if these metadata could be used from SAPUI5 controls, it would save a lot of developing time.
Smart Controls do use these metadata to provide powerful functionality. They are a specific category of SAPUI5 controls that have some special features in addition to the standard SAPUI5 features and thus make it easier to use the control in certain scenarios. Smart controls are part of the sap.ui.comp library and are focusing strongly on SAP Fiori elements.
The namespace sap.ui.comp contains the following control types:
- SmartTable and SmartList
- SmartChart and SmartMicrochart
SAP will continue to maintain the library and all of its controls in the future. However, there will be no development of new features unless specifically requested by SAP Fiori elements.
OData Service can be implemented using the SAP Gateway Builder or ABAP CDS (for example, leveraging the SAP RESTful Application Programming Model).
The figure shows the properties of an entity with the name Flight. As you can see, each property of the entity has various attributes. As the figure shows for some attributes, the attribute
Filterable is ticked. The property
Currency is bound to the currency-code semantic. This information can be used at runtime in the application to provide certain features - for example, a value help at the Currency field.
Checking OData Service Implementation
Navigate through the following simulation to learn how to check the OData service implementation.