on ‎2014 Dec 09 5:39 PM
Hi Experts,
I have been working with both oData and Json Models. Now I want to know on technical grounds, that what factors lead to the selection of a model?
When to use which model?
Request clarification before answering.
Hi,
oData model is mostly used where situation demands for getting data from Backend system which make it a server side model, where as JSON model is for Client side model.
Also oData model is used for large dataset when compated to JSON Model which is for a small dataset which consume less memory.
More details can be found here:
Hope this helps you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The ODataModel is a server-side model, so the whole dataset is only available on the server, the client only knows the currently visible rows and fields.
When you bind a control to an OData model , it comes with many features out of the box such and filtering capability, sorting, pagination etc. However the corresponding server side implementation needs to be in place. Using SAP Netweaver Gateway you can expose SAP ERP data in form of OData service and which can be easily consumed in UI5.
On the other hand JSON model is client side model based on JSON data to be used for small set of data.
JSON is just a Data-interchange format based on JavaScript.
I hope this may be helpful for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oData Models are usually for larger sets of data, while JSON models are for smaller sets of data. It depends on what you will be using it for. For example, if you have a grid and you are binding a view from your SAP HANA db, you could easily use the oData model as you can do a direct bind. It would be a benefit to use oData because of the pagination, etc.
if you don't have a direct bind from the DB view into a control, then you could use a JSON model. for example, you could use a JSON model (as well as an OData Model) for a simple drop down box if you needed to alter some of the properties in the drop down items.
you however, could get data out of both models and you can get JSON objects. I hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.