Storing dynamic structure in a web app
<p>Lets assume we have a web app which allows users to create and modify some dynamic structure (say, graph of some kind) and we don't want save changes permanently until the user clicks 'save' button. What is the best way to store and modify that dynamic structure? </p>

<p>Is it a good idea to use a plain JSON file on the front end, which we can modify according to user actions and then send to the server to update the database when user decides to save their structure? Or should we communicate with the server every time user makes some change, even if he can later decide to discard this change?</p>

<p>Is there a 'standard approach'?</p>