Skip to Content

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

/wp-content/uploads/2013/12/01_338219.png

   
 

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.    

 
  /wp-content/uploads/2013/12/02_338220.png

How these objects collaborate?

 
  /wp-content/uploads/2013/12/03_338221.png

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 .

 
 

/wp-content/uploads/2013/12/04_338222.png

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply