sapui5 mvc, sapui5 mvc approach, sapui5 mvc architecture, sapui5 mvc concept

MVC architecture in SAPUI5 application

MVC stands for Model View Controller. It is a software architectural pattern where in the software is developed in loosely coupled components of Model, View and Controller. The three components interact between each other and exchange data.

sapui5 mvc, sapui5 mvc approach, sapui5 mvc architecture, sapui5 mvc concept
mvc in sapui5

Model – Model is responsible to manage the application data.

View – All logic pertaining to view design will be placed in the view file.

Controller – All functions and event handling is written in Controller file.

MVC has become a standard design pattern that developers follow to create Desktop, Web and Mobile applications.

SAPUI5 strictly follows MVC architecture. If you create a SAPUI5 application in WebIDE, it automatically creates application template based on MVC pattern. If  you create application using Eclispe, on selecting checkbox Create an Initial view, it creates SAPUI5 application based on MVC pattern.

The above image shows how SAP WebIDE follows MVC pattern. As you can see, it clearly creates separate folders for Model, View and Controller. Hence, the code for Model, View and Controller is separated, and as a developer you follow the MVC pattern.

The same can be achieved if you use Eclipse as your development IDE. The idea is to separate the code for Model, View and Controller.

What is the advantage for following MVC pattern? Three big advantage is:

Code Re-usability

Code Maintainability

and code readability

SAPUI5 Tutorials