Thursday, 7 November 2013

Comparison between XML Vs HTML Vs JSON as Search And Promote output

There are many ways too display the Search And Promote outputs. Some clients asks for XML, some may ask JSON and some wants HTML.Let us see what are all the pros and cons of all these outputs? When we decided to go for S&P which format output we can go for.

Advantages of XML:

  1. XML gives greater flexibility to display the results.
  2. It is decoupled from presentation layer with more readabilty.
  3. HTML look and feel can be changed any time without modifying the XML layer.
  4. Same XML output feed can be used for mobile or desktop websites. No dependency on it during implementation.
  5. Less size, more oriented with tags.
  6. Webapp get more flexibility, to include any extra information or to restrict some data from users based on location or anything etc.

Extra changes will need to be made in the webapp to transform XML to HTML

Advantages of HTML:

  1. Everything is ready with the output. 
  2. Website owners need not work on further development because already the output is in html form.

But any change in UI can be an additional task in future.

Advantages of JSON:
  1. Lightweight, more readable.
  2. No xml tags.

Encoding from JSON to html can be a tedious task in the first time. 
In case of multi nested facets, it could be tedious to iterate through the deeper facets.

Update; Adobe Search & Promote is now Adobe Target