Skip to Content
avatar image
Former Member

UI5 and REST

Hi,

Does ui5 offers the developer any advantage for working with REST services?

(I know it is possible to call a rest service in ajax but the question is if UI5 gives the same support for REST as for OData)

Regards,

Elena

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jun 01, 2017 at 03:24 PM

    I think UI5 point of view, if you use JSONModel or XMLModel instead of a OData model, we can call REST services. See sample

    var oModel = new sap.ui.model.json.JSONModel();
    oModel.loadData(jQuery.sap.getModulePath( <RESTURL>), "", false);

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 01, 2017 at 09:21 PM

    just like ORM framework(which hide sql from u), rest service is wrapped in a (ui5)model for you to consume.

    Add comment
    10|10000 characters needed characters exceeded