There would be an oData service modeled before the developement phase, at least in an ideal world. We can then let our frontend ui5 developers use the mockserver instead of running oData service on SAP GW. The mockserver responds to all oData requests with some sample data, so our backend developers can feel free to experiment with SAP GW as much as they want and not to be afraid of stopping ui5 developers from work.
The mockserver can be found in library sap.ui.core.util.MockServer. The settings are quite simple, even though some mistake can take you hour(s) of debugging (like me).
jQuery.sap.require("sap.ui.core.util.MockServer");
// Create mockserver
var oMockServer = new sap.ui.core.util.MockServer({
rootUri: "http://mymockserver/",
});
oMockServer.simulate("model/metadata.xml", "model/");
oMockServer.start();
// setting up model
var oModel = new sap.ui.model.odata.ODataModel("http://mymockserver/", true);
sap.ui.getCore().setModel(oModel);
I used my example openui5 application that can manage(add, edit, delete) users and boosted it with mockserver.
You can try the application with mockserver by yourself here - http://pmarcely.github.io/mockserver.html
All the codes are also in my github:
Hope you enjoy it!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
7 | |
7 | |
6 |