Skip to Content
Author's profile photo Former Member

Using Mock server for parallel SAPUI5 & OData development

SAPUI5 framework is the web development framework and the underlying technology behind SAP’s Fiori applications. This adopts a MVC framework. It is a framework where you isolate your application into separate components namely the Model (which is your data), View (which is what you see) and Controller (which is what connects both). The underlying principle for this framework is to efficiently reuse these components and also allow a parallel development approach.

But I feel that a lot of organizations who are into SAPUI5 & Fiori Apps development might not be adopting this parallel development approach enough in their pursuits.

Every SAPUI5 application development mostly accompanies a backend OData development and this backend development normally involves ABAP. You tend to follow different kinds of approach in efficient utilization of your backend and frontend developers to manage the overall end-to-end development of your SAPUI5/Fiori applications.

Here, I am trying to highlight some of the approaches followed by UX teams and in the process put together a use case for a nice little functionality called Mock Server, provided by SAPUI5 that helps in adopting a true MVC based approach.

This is the scenario where you have a single developer with both SAPUI5 & OData development skillset. This works well when the overall scope of development is less and you can achieve results with minimal number of resources. Finding a good resource with both SAPUI5 & OData development skillset can be challenging, but if you do find one, it’s a good asset to have and the overall integration & support for the solution would be more cost effective. But it would become difficult to manage when the overall UX scope is high with potentially large number of SAPUI5 development. In such scenarios, you would want dedicated frontend and backend developers.

This is the approach followed by UX teams comprising of resources with separate backend and frontend development skills and with no prior knowledge of the Mock Server functionality provided by SAPUI5.

Once they get a requirement for a new application development, both backend & frontend begins to do their part independently. The frontend folks are limited to developing the UI pieces where there is no backend service dependency. And once the service development is fully complete, the remaining frontend development is taken up and integration done. This tends to result in integration issues, a lot of re-work and potentially hamper the quality of the overall application.

But by leveraging the right tools provided by SAP, you can turn this process into an efficient one. This is where the Mock Server functionality provided by SAPUI5 comes into picture.


As you can see, the frontend & backend team spends some initial time in understanding and coming up with the overall data model for the application. Once this is finalized, the Odata developer can in very less, implement the data model in the backend system and generate the metadata of the service. Once you have the metadata ready, the frontend developer can use this and configure a mockserver in the SAPUI5 application. The mockserver can generate all the data that you need without relying on the backend service or network connectivity. At the same time, the backend ABAP developer can focus on implementing the CRUD functionalities in the OData service without relying on the front end requirements.

This works out very well and ensures an overall decoupled SAPUI5 development when the scope of SAPUI5 development is significant. Once the frontend and backend development is complete, you can do an integrated unit testing.

Here is the SAP link to learn more on Mock server.

You will notice this functionality automatically added when you use SAPWebIDE for your SAPUI5 development.

Happy Coding!

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.