Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

MVC approach in SAP UI5

$
0
0
Introduction:
This document mainly gives an overview about MVC architecture of SAP UI5.The Model-view-controller pattern sepeates the modeling of the domain, the look and the actions based on device input into 3 different classes.
Model:
  • A bridge between view and data of the app.
  • Accepts the request from view and responds accordingly.
  • Doesnt depend on any classes.
View:
    • Manages the display of information.
    • Dependent on Model
Controller:
  • Deduces the input given by devices and communicates to model/view to take proper action.
  • Dependent on model
SAP UI5:
  • A Java Script open Ajax library for building internet apps.
  • This framework is lightweight.
  • Easy to integrate with any 3rd party JS libraries.
MVC Approach in SAP UI5
  • Model manages application data
  • View is responsible for GUI of the application
  • View and Controller have 1:1 relationship
  • Controller entertains user requests received from View
SAP UI5 offers Views and Controllers in the form of single files, i.e.
  • sap.ui.core.mvc.Controller
  • sap.ui.core.mvc.XMLView
  • sap.ui.core.mvc.JSView and
  • sap.ui.core.mvc.JSONView

 

JSONModel

  • It does support Two-way-Binding.
  • It is a client side model, so it is meant for small datasets.
  • Can be used to bind controls to JavaScript object data.
  • it does not contain any mechanism for server based paging or loading of deltas.

XMLModel

  • Allows to bind controls to XML data.
  • It is a client side model, so it is meant for small datasets.
  • it does not contain any mechanism for server based paging or loading of deltas.
  • It does support Two-way-Binding.

Table

 

provides the possibility for sorting and filtering based on the capabilities of the model

This control provides a set of sophisticated and comfort functions for table design.
For each Column a template control must be defined

Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>