I am thinking of a standard AJAX setup (JS<->PHP<->MySql).

I want to generate reports (charts, tables, etc) probably using at maximum a few dozen data points (certainly never over 1k).

I am unsure whether to download all data on initial page load and generate charts when the user changes a parameter - say start date for example - using JS totally on the client side or to send an AJAX request to the server & use PHP there to generate & return a chart.

What should I take into consideration?

  • Is there a standard approach, or does it "depend"?
  • Any considerations of performance with so little data? Security?
  • Might client side be better if I want to export the reports?
  • Does it just boil down to which ever free charting package looks good to me?
  • For smart 'phones, can they readily generate charts responsively, or would it be better to download them as an image file form the server?
  • I suppose that it also depends on whether I will allow the user to click the charts & perform operations, or drag things around, etc. I.e. if I want something dynamic, or if a static image will suffice
  • 1
    I would start by looking at some PHP reporting frameworks, like this one. Commented Jan 27, 2015 at 16:58
  • What's "D/L"? Also what do you mean with "data points" ? Commented Jan 27, 2015 at 17:21
  • 1
    Availability and skill in reporting package usage is imho key. You can use some very good ones for JavaScript, too. Learning D3JS would be likely to be useful for your present project or in the future.
    – deStrangis
    Commented Jan 27, 2015 at 17:38

1 Answer 1


You are in the land of "depends"

I tend to favor client side reporting. However if it takes longer to transfer the data points then your in sever land.

There is no standard answer. For smaller data sets client side is fine and common.

No real performance concerns with small data sets other then off loading chart generation to the client (browser) means your can handle more requests.

Exporting the report depends on your needs, There are better server side solutions then client side ones for exporting reports, but why do they need to be exported. Can't they just be re-run.

It does depend on charting package, but go beyond just looking at the free ones. $200 is not that much in the grand scheme.

Modern mobiles can generate carts just fine, depends on the charting package.

Your much better using "dynamic" from the start. I have never seen a report that didn't make the user want to "drill down" somewhere.

  • 1
    I agree 100% with what you say. Thanks for clarifying. As to "why do they need to be exported", there’s always someone who says "weneed it in Excel".
    – Mawg
    Commented Jan 28, 2015 at 8:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.