I'm working on something and my knowledge is not enough to undestand if what I'm trying to do is "wrong" or "not a good method"...
So, as my title says, if we add the results of a query to an Array component in our page, would that be appropriate or not?
How can we check the impact of that method on the user end?
I don't have a large dataset to check it and also I can't check on mobile devices what happens...
And the most important I don't know how to check it...
Off course you would ask "how large is the data you want to add?
That's what I'm trying to figure out and then maybe I can set a limit on that functionality...
Anybody can give me an idea of what can happen in that case?
What I'm working on is a kind of infinite scrolling
(no matter if the loading occures on scrolling or on button clicking)
So, something like our community forum "load more" topics handles the loading of the topics...
Here is a short video of my attempt (but with only 26 records...)
Every time the query reurns 10 records but they get added to the existing records list of the table in my page
I dont think this method will be much dufferent to a query JSON response in relation to dataset size so i guess my answer would be, if you would deal with a query that size then in array form would be acceptable.
From what I undesrstand from your answer, since the serverconnect everytime is loading only xx results, all I have to pay attention is the Array to not be overload...
Just like loading straight forward a query with 2000 records (without pagination it is not suggested)...
Beside I was wondering, where are the query results loaded so they are available in our page?
Instead of holding all the amount of data there, hold them in our Array...
as you load records in sets of 10, each old query data will be overwritten so you will never store more than 10 as JSON.
Your array will of course grow as you page through.
Alternatively you could just repeat the same paged query over and over again but changing the limit parameter to 10 bigger each cycle.
This will have a bigger data overhead but would be easier to implement i think. Database server speed would be a huge factor if re-running the paged query each time.