Pulling data from server... ServerConnect or DataView?

Hey guys,

The content of my post is based on my small experience on web applications and especially on server behavior, so forgive me if I ask stupid questions…

I would like to ask your advise on the way I should pull the data on a product administration page (the list of products)…
I have used ServerConnect to pull my product List and it works perfect. This list is getting parammeters from a Qeary Manager and passing them to my filters (a kind of custom “tagify” list I made) that call the ServerConnect accordingly.
Here is a video:

The reason I ask is because I see too many calls to my Server, is that good? And this is just for only 2 products (records) that I have saved in my dbase for testing (about 1,5kb for 2 products).
If my products are 500 or 1000 what happens then?

And the main question is:
Would that be better to go with DataView to pull my data? Is my data’s size appropriate for using the DataView?

  • php
  • MySQL

Any idea would be mush appreciated

Thanks in advance and sorry for any novice/stupid questions,
Tasos

That does look like a lot of calls.
How is your page structured.
It looks like you may have a server connect action inside a repeat calling a single record on each iteration?

Hey Brian,

Thank for your input.

I don’t know if my structure, I think I have done everything fine just like every tutorial and document provided. Maybe every single step is fine as I say but the final compination is wrong or maybe there is a better way to accomplish my goal.

My BS data table is driven by the prodList SC with inputs that are defined from the “filters” area and these are updating/updated from the Query Manager

i see the same server API action being called multiple times i.e. product_list.php

image

Where is that called from and why so many calls

The prodList has parameters (these parameters define the query output)

Every time I change a filter’s value (search value, category, group, price etc) the prodList SC is reloaded

So they are a combination of multiple acesses?
can you clear the console and show what results from a single refresh

dmx.app.data you mean? There is loooong list

For tables with less than about 3,000 records, I will use DataView. This loads the Server Connect once while all of the filtering is on the client. Very fast and efficient.

If the table has a larger number of records, then it would take too long to load all of the data and DataView may no longer be a viable option.

I have not had an occasion where I have had tables with a large number of records. But if I did, I would expriment with data caching and/or reducing the number of records by pre-filtering on the server to then using DataView.

Having said that, once you get past serving HTTP/1 - as in HTTP/2 and HTTP/3- I would not worry too much about the number of HTTP requests.

1 Like

Hey @ben,

This is what I have seen again in your posts… I see the rule of ~3000 records but no matter the columns and their kind (text, files single, integer etc…)
So, you recommend on trying to invert/rebuild my structure using DATAView component.

About the HTTP requests… I have to serach and study about because I don’t fully understand.
Anyway, I like new things because I learn and become better.
Thank a lot for your advice!

No I mean.
Open the developers console
Go to network tab fetch/XHR tab
Clear the list
Refresh ONCE then show me output

This is the first i did when I posted in order to understand what calls are made…
Please see the video I uploaded in my first post.
If you need something more please tell me.
Thanks a lot brother

Sorry, forgot!

To be honest I really don’t see an issue with the number of calls, I have many sites which have far more and perform perfectly well
DB servers are so fast now they can cope with the demand easily

Regarding @ben 's comments. I agree to some degree but personally I am not a fan of client side filtering as I have had performance issues on smaller devices, especially cheap tablets and phones where they really struggle with the load if data sets are large.

2 Likes

Thanks for your valuable feedback!

I am slow on building my website but I believe it is solid and performs like a charm.
The only matter I have is the server behavior and trafic limits on public use(internet).
If this was a desktop app running on my pc it would be perfect. But… it isn’t, so I have to study.

Thanks again @Hyperbytes and @ben for your valuable advices!!!
I wish you both health and success (more success if possible)

2 Likes