0

I have a web application which uses client side MVC (using backbone JS) and Spring on the server side. I have a use case where I need to have some data which can be updated on a daily basis (or maybe once in two /three days). I need to use this data at the client side and do some manipulation. (Security is not really an issue for this data).

I was thinking of keeping this data as JSON on the client side in a / multiple files and use these files using JS on the client side. We can have a new version of these files everyday.

Considering the somewhat static nature of these files, I was thinking to push these JSON files to a web server (Apache for example) and not keep them in the War deployed on the server to reduce the overhead on the server. There is a heavy traffic for this usecase.

Could you please let me know if I am thinking in the right direction and if this approach would be feasible. Also, how can I handle the batch updates of the JSON files in the webserver (Apache).

Abby
  • 403
  • 2
  • 6
  • 18
  • I missed to point out that the site would also be accessed by mobile devices (including tablets) using their browsers. – Abby Sep 18 '14 at 10:11

1 Answers1

0

You can keep this data in Local Storage. Remember to have polyfill for old browsers.

Note that you can use also client side databases based on Local Storage

Community
  • 1
  • 1
Boris Zagoruiko
  • 12,705
  • 15
  • 47
  • 79
  • What advantage would be provided if I use an approach of keeping the data as JSON in a file (in webserver or bundled with the WAR) and accessing the JSON from javascript function – Abby Sep 18 '14 at 11:53
  • I just provide your the way to keep your data on the client side in user's browser. I can not provide you nor advantages or disadvantages of it. I don't know much about your architecture and don't know about aims to keep this data. I don't know even the size of it and how often user request for it. – Boris Zagoruiko Sep 18 '14 at 14:32
  • Anyway, if you decide that local storage is not your way, look a bit on server-side json-based database mongoDB. – Boris Zagoruiko Sep 18 '14 at 14:33