I have a website with a form (currently it's plain HTML but we're switching to JQuery). The flow is like this :
- Take in the user's inputs --- 5 integers
- Make a call to a web service via REST
Run some calculations server side... and generate a JSON object
??? Now I have my result JSON object, but how do I get it to the client? Persist it? ??? Does the URL need to be the exact location of the JSON file? That would mean 100's ??? of JSON files in my web server's DIR.
D3.js on the client side, waits for the data to be present (via AJAX?).
var data; // a global d3.json("path/to/file.json", function(error, json) { if (error) return console.warn(error); data = json; visualizeit(); });
Once data is present, render for the client, and remove the calculator from the screen.
I'm having a tough time here, because I notice all AJAX requests need a URL.. but then does that mean I need to give a unique URL to each resulting JSON object? Doesn't that mean I need to persist that object?
I'd just like to have d3.js render my JSON object but unclear what are my options for where to put it.