0

I need some advice here:

I am working on an application that is supposed to display data in a timeline view with Weekly, Monthly and Yearly options. I have two options that I'm torn between;

  • I could fetch all the data at once and let the user interface display it in the timeline properly
  • I could fetch data every time the user toggles into the next period e.g. when they change into the next month, fetch data for that time range

I need some counsel here on which is the best approach?

John Mutuma
  • 3,150
  • 2
  • 18
  • 31

1 Answers1

1

Do this whole thing in the back-end, and then take the processed data in the front-end. Make a database query with respect to the timestamp. Use offset concept if you doing pagination stuff. P.S - Please mention the database you are using.