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 V4, and OData V2 (both
							server-side).

OpenUI5 provides the following predefined models:

Whether data can only be read from the model or also be written to the model using data binding differs between the models. For an overview, see Binding Modes: One-way Binding, Two-way Binding, and One-time Binding. Note that two-way binding is currently only supported for properties, and not for aggregations.

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 server requests.

The OData (V4 or V2) models are server-side models and only load required data from the server.

You can define several models for use with your application 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.

Related Information

API Reference: sap.ui.model