I am currently working on a web app where the database has tons of data. Speaking about millions of millions. In cases where I want to display a table with all that data (with navigation and other filtering functionalities FOR ALL DATA, using the Datatable library for instance) -
How is the best proper way to display it?
I reviewed a few posts like: How to pass variables and data from PHP to JavaScript?
And I'm still not sure if the Ajax way is the best method in this case: It involves a new http request that might take longer than printing data directly to the page, especially when there's a lot (..A LOT!) of data. I would be loading a page with an empty table and waiting for data to get back from the server.
Printing all the data directly to the DOM and manipulating it - with a lot of data it might "flicker".
The third method includes printing the data directly to a JS variable (lets say a JSON is returned from PHP), and, well, insecure and not clean, ect' ect'.
Which is the best method to my case? Are there any other methods recommended? Does React offer any proper solutions for these kind of situations? How?
And just from curiosity, working with Nodejs solve this kind of situations? (I'm not going to change to nodejs, just curious)