0
3.5kviews
Explain in detail architecture of JSON mashups with neat diagram.
1 Answer
2
184views

Architecture of JSON Mashups

JSON Mashup

Flow of JSON mashups that use Dynamic Script method goes as follows:

  1. The flow of the process starts with the browser sending request to the server by using HTTP GET.
  2. The Web Server responds with a page that includes the following couple of important JavaScript functions:
  3. A parsing function that expects JavaScript objects to be parameters.
  4. The Dynamic Script method is the core of the initiation script through which a new script tag is added to the page, specifying the source for that script tag to be the Uniform Resource Locator (URL) at some partner site.
  5. The source code for the new script tag gets loaded by the browser.
  6. Amazon receives an HTTP Get request sent from the browser using the loaded script.
  7. A JavaScript object, after being serialized into a JSON Object, is served by the partner site.
  8. A function call to the render function wraps the JSON script, and the JavaScript entirely becomes the content for the script tag.
  9. The new piece of JavaScript is tried for execution by the browser, which calls the render method from step 3.
  10. The server invokes the render method and evaluates the JSON script, which is converted into a JavaScript object. The data contained in the render method is pushed into the page after the render method, which uses the new JavaScript object in its execution.
Please log in to add an answer.