I'm currently developing a server side application presenting graphs, stats, reports and so on.
The application is using Highchart library (chart generating library) from Highsoft (Awesome tool!) based in javascript.
If I were to create charts in front end, using highchart is all cool. But problem.. or consideration comes when I were to create charts in back end (server side) with generating report.
Because the nature of Javscript, where it is design for front end (web), if I were to use them in backend, I have to use phantomjs/nodejs.
But if I were to do the same job in serverside languages, such as PHP, I'm certain that it can process/create the charts much faster. (with different charting lib)
Also it is difficult for me to fully rely on stability of using phantomjs/nodejs. (I have seen and experience few issue with running nodejs)
So the question I would like to ask people is that what is the "Performance Difference between processing in back end vs phantomjs/nodejs" under assumption that they do same calculation/computation task in terms of metrics. (eg approximately php is 3 times faster then javascript through phantomjs to do same task.)
As I'm a newbie developer and I need much advice or suggestion before I decide which language to choose before implementing them.
If anyone already have done it, please share the knowledge. It would be greatly appreciated!
Thank you for reading.
-Danny C
The nature of reports is that they need to present correct data and interactivity part is less important, or even impossible.
If you generate report as dedicated URL where user navigates to, use same chart you are using in frontend
If you are generating PDF/Email reports go for stable and (if needed) extendable server side solution, pChart for PHP or some other stable and well documented solution
And remember, people are quite used to idea that chart on reports look different that charts in App/Front end, so don't worry your self too much about that, find something stable, build well documented and maintainable system.
+ extra points if you use some kind of Api/Data provider layer so you can use it for both reports and Frontend, and switch implementation at any point.