Data Formats

1,104 views

Published on

Common data-formats which are used to store configuration information and to transfer data between systems are discussed.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,104
On SlideShare
0
From Embeds
0
Number of Embeds
13
Actions
Shares
0
Downloads
22
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Data Formats

  1. 1. Data Formats By Subhash Chandran
  2. 2. Types <ul><li>Storage
  3. 3. Integration and communication </li></ul>
  4. 4. Types <ul><li>Binary
  5. 5. Text </li></ul>
  6. 6. Binary Formats <ul><li>Costly to implement
  7. 7. Both systems should support same interfaces
  8. 8. Both should support the same version of the interfaces </li></ul>
  9. 9. Some Binary Formats <ul><li>CORBA
  10. 10. RMI
  11. 11. COM
  12. 12. EAI </li></ul>
  13. 13. Some Text Formats <ul><li>Strict text formats (think COBOL)
  14. 14. CSV
  15. 15. Ini
  16. 16. Java properties
  17. 17. XML
  18. 18. JSON
  19. 19. YAML </li></ul>
  20. 20. <ul>Strict text formats: Limitations </ul><ul><li>Each and every column to be defined precisely
  21. 21. The definition should be understandable by all participating applications </li></ul>
  22. 22. CSV <ul><li>Good way to share tabular data </li></ul>
  23. 23. CSV Limitations No one standard: “name”,”age”,”,”” name,age,, Both the above are valid!
  24. 24. Ini Format <ul><li>Two levels of hierarchy supported
  25. 25. Good parser support </li></ul>
  26. 26. ini format example [key1] subkey1 = value subkey2 = value [key2] subkey1 = value subkey2 = value
  27. 27. Java Properties <ul><li>Well defined
  28. 28. No external library required for parsing </li></ul>
  29. 29. XML <ul><li>Well defined
  30. 30. Has well defined set of complementing technologies: DTD, XML Schema, XSLT, XPath
  31. 31. Wide support in many programming languages
  32. 32. Any level of nesting </li></ul>
  33. 33. JSON JavaScript Object Notation
  34. 34. JSON <ul><li>Ease of parsing using JavaScript
  35. 35. Good for Ajax </li></ul>
  36. 36. JSON Examples [&quot;python&quot;,&quot;java&quot;,&quot;ruby&quot;] {&quot;python&quot;:&quot;Guido van Rossum&quot;,&quot;php&quot;:&quot;Rasmus Lerdorf&quot;,&quot;java&quot;:&quot;James Gosling&quot;}
  37. 37. Serialize Java Objects as JSON
  38. 38. Consume JSON in JavaScript: Arrays
  39. 39. Consume JSON in JavaScript: Map
  40. 40. YAML: YAML Ain’t Markup Language american: - Boston Red Sox - Detroit Tigers - New York Yankees national: - New York Mets - Chicago Cubs - Atlanta Braves
  41. 41. When to use what? Ini Two level hierarchy. JSON When JavaScript consumes your content. Ajax applications. XML All cases! YAML Human editing is needed.
  42. 42. Thanks :-)

×