docs

Models

A model in the Model View Controller concept holds the data and provides methods to retrieve the data from the database and to set and update data.


UI5 provides the following models: JSON, XML, Resource (all client-side); OData V2 and OData V4 (both server-side).

OpenUI5 provides the following predefined models. For an overview of the binding modes supported by them, see One-time Binding, One-way Binding, and Two-way Binding.

The JSON model, XML model, and the resource model are client-side models, meaning that the model data is loaded completely and is available on the client. Operations such as sorting and filtering are executed on the client without further server requests.

The OData (V2 or V4) model is a server-side model and only loads the data requested by the user interface from the server.

You can not only define one model for your applications, but define different areas in your application with different models and assign single controls to a model. You can also define nested models, for example, a JSON model defined for the application and an OData model for a table control contained in the application.

A Web application should support several data sources, such as JSON, XML, Atom, or OData. However, the way in which data binding is defined and implemented within the UI controls should be independent of the respective data source. It is also possible to create a custom model implementation for data sources that are not yet covered by the framework or are domain-specific.

Related Information

API Reference: sap.ui.model