the fat free alternative
TRANSCRIPT
The Fat-Free Alternative
Marwa Gamal
Fat ?? Free ?? Alternative !!
Fast !!
Three ??
XML everywhere
Even CAT become XML
!!اى حاجة فاى حتة فاى وقت
فى حاجة كاملة فى الدنيا هل
!!! ؟
XML Really BAD !!
• Character Encoding
• Embedding binary data
• Indentation Characters Mixed With Data
• Textual Representation of Numeric Data
<int>1234567890</int>
• Human un-readability
• A single XML root element
Alternatives ??
Not Used !!
CSV
YAML
JSON
DL
Property Lists
GroovyMarkup
…..
XML alternatives
XML Alternatives
CSV “ Comma Separated Value”
EX :-
Year,Make,Model,Length
1997,Ford,E350,2.34
2000,Mercury,Cougar,2.38
Cons : -
homemade parser is required to convert the CSV data into a native data structure.
YAML EX :-
receipt: Oz-Ware Purchase Invoice
date: 2007-08-06
customer:
given: Dorothy
family: Gale
cons :-
very immature API , Not commonly used.
JSON
JavaScript Object Notation
FAT ?? FREE ??
ideal data-interchange language
XML vs. JSON
XML
• Good namespace support
• Widely Supported
• Less memory usage to decode
• “ DRY or DIE “
JSON
• Simple API
• Very good support by all browsers
• Concise format thanks to name/value pair -based
approach
• Fully automated way of de-serializing/serializing
JavaScript object
• Supported by many AJAX toolkits and JavaScript
libraries
Using JSON !!
Yahoo! Web Services Google Data Protocol Delicious data feeds Flickr services
...شوية احصائيات
number of JSON APIs During 2009 : 191 JSON APIs registered. August 2010 : 223 APIs
April 2011 : 1262 JSON APIs registered
growth rate : 565% in the past eight months
For more http://www.json.org/