Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

MVC best practices for SAPUI5

Hello gurus,

Are there any best practice guidelines to develop a complex app in SAPUI5? There is an excellent guide Application Best Practice but it looks not full enough.


- where to place the logic which can be called from different views? In the Component.js? How to call it passing the context?

- how to pass data between views controllers?

In WebDynpro MVC approach there is a central Component Controller responsible for data manipulation with backend Model and manage a cross-view data (e.g. settings). So view controllers only handle a user input, manage their local data and then call a central controller.

Former Member
Former Member replied

Hi Anton,

Regarding your first question about reuse logic: I created a custom controller in my utils folder, which implements some mutual functions.  View controllers that require the mutual functions inherit from the custom controller, others view controllers are simple sap.ui.controllers. 

An example is given for getrouter, step 3 of application best practices

Kind regards


0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question