Friday, November 9, 2007

Exchanging Data

I'm fairly certain that there will be many types of databases used to store digital information. In other words, the idea that everyone would use the same database technology to store all of their information is not ever likely to happen, nor would it necessarily be a good thing. For the idealist though--like myself on occasion, I'm enthralled by the potential of all digital information being stored in a SQL compliant relational databases.

Okay--so enough of that idea. The truth is that data exchange between these databases is a fairly important topic. If there can't be one giant database for everything we need rules or standards to help make data transitions/transactions easier.

I've been aware of and reading material from Dave Winer for a long time now--maybe 13 years. At some level he's on my "folk" hero list because I respect him as a master of "organizing the digital world". He was really a pioneer in the area of software based "outline" programs (Thinktank, Ready and More) and while I haven't used his object database for long while, I have been deeply impressed by its capabilities.

At the moment there seem to be two competing technologies in the data exchange arena. Mr Winer and Microsoft have collaborated on XML-RPC--which if I understand correctly is now recognized as SOAP. Now a technology called JSON enters the scene--and as it happens--not without controversy.

mikechampion's weblog : The JSON vs XML debate begins in earnest Annotated

Finally, in the larger scheme of things it doesn't matter. What does matter is that there be standardized, widely supported means for making data interoperable across applications, platforms, programming languages, and time. Life would be easier for us infrastructure implementers if there were a single, stable standard, but it's unrealistic to expect that XML 1.0 would be the last word on the subject. We will cope with whatever happens -- small tweaks to address critical bugs that JSON illuminates, multiple de facto data interoperability standards, guided evolution of XML to be a better universal data interchange format, or wholesale revolution to produce a better world.

Simon Willison

The sweet spot for JSON is serializing simple data structures for transfer between programming languages. If you need more complex data structures (maybe with some kind of schema for validation), use XML. If you want to do full blown RPC use SOAP or XML-RPC. If you just want a light-weight format for moving data around, JSON fits the bill admirably.

What do we lose from not using XML? The ability to use XML tools. If you’re someone who breathes XSLT that might be a problem; if like me your approach when faced with XML is to parse it in to a more agreeable data structure as soon as possible you’ll find JSON far more productive.