Skip to Content
Author's profile photo Former Member

ui5 How to keep view independent with model

When develope UI5 project we will encounter following issues

  1. Some times  data model cannot easily decide for odata structure can not easily decide
  2. So our view and model mapping relations is very flexible like following diagram.
  3. All data model mapping to view should be asynchronized. So the different mapping pattern will affect our coding style a lot.
  4. Hidden data access method , Using the same interface to access data no matter the data is odata service or just a mock data
  5. Provide a another glue layer to resolve the mapping issues ,keep the view independent with the model
  6. Avoid multi synchronized invoke form the view (controller) keep the view be stable.

What to do



How to do

  1. Using factory pattern to make the data access method change easily
  2. Different class in charge of different layer task. Decoupling the view and model.    


How these objects collaborate?


How to Use?  Coding Sample :

Following I will introduce two patterns:  One view one model  & one view multi model .

Now you will find their coding pattern are same . All complex is hidden .

One view on model .



Assigned Tags

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