cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi all,

just wondering about your recommendations / best practices regarding the following:

I have a number of different types of client side data that my application needs to manage. To benefit from SAP UI5 data binding, I'm using the JSON model as store.

My question is, should I

1) Create a separate model for each type of data

2) Should I strive to minimize the number of models, and use different properties inside one model to structure my different types of data?

I figured that in terms of development, there is no real impact associated with either way. It doesn't make much difference if I have to manage many model names as opposed to managing many paths inside one model.

What I am not sure about is memory consumption and performance. I am assuming that creating a new model comes at the price of some overhead, and I am assuming that once a model is created, it doesn't cost a lot to have it manage multiple paths where data is stored.

But are these assumptions correct? And if so, how big is that overhead?

Very interested to hear your recommendations and opinions - thanks in advance!

0 Likes
View Entire Topic
SergioG_TX
SAP Champion
SAP Champion
0 Likes

yes in the assigning a model to a variable inside the controller - I probably said it wrong, but what I meant was the same thing you said along the lines of ...

var model = this.getView().getModel(<some model>) ;// so you can minimize the use of variables here... i concur with you here.

we probably need more opinions from others who have used different approaches, but I will guess that most developers skip the hassle to having many models... and instead minimize them to a single one.

anyone else??