简体   繁体   中英

XML - CSV data output: server-client interaction and optimization

I am planning an application that involves pulling XML data from the server side and manipulating it on the client side before allowing the user to save it as CSV.

On the server side, I will use Apache and PHP as the primary service interface, and the data source could be coming from MySQL server and/or Exist database server.

Then, on the client side, I am thinking of using ExtJS to allow users to 'limit & view' the data and further format it in that table grid. Then, ExtJS would 'POST' the formatted table grid data and POST it to a second PHP controller that simply takes the data and convert and save it to a CSV attachment.

My question is, given the stack involved, is this the best way to do this? If there is a way for ExtJS to directly output the data as a CSV file, should I use it? I mean, Javascript is not supposed to write to the HD, right?

In case any of you are wondering, why the manipulation could not be done first, I am trying to use a limited number of stored queries only (on both MySQL and Exist), to serve frequently requested and updated data.

Thank you in advance for any comments and suggestions.

My question is, given the stack involved, is this the best way to do this? If there is a way for ExtJS to directly output the data as a CSV file, should I use it? I mean, Javascript is not supposed to write to the HD, right

I don't see it as a bad way to do it based on what you are trying to achieve. I wouldn't rely on Javascript for saving, which it cannot do directly. I would definitely recommend that you handle that on one backend as it would be easier and probably more reliable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM