I read "Linking in JSON" the other day. I knew someone had already gotten started on JSON Schema. (A quick search shows JSON namespace ideas floating around.) JSON as the lightweight alternative to XML being turned into XML? This is beginning to sound familiar.
With lightweight formats, we tend to get a proliferation of variants for different uses. (Not just images, naturally, and CPAN manages to use more than one.) Heavier formats tend to have a problem I'm going to call "Accessories Not Included": they get sufficiently large and complex that not all readers support all format options. If the growth is arrested early enough, you end up with a handful of profiles; if it gets out of hand, you have over ten of them.
I never expected XML to be so widely used for so much stuff, or spawn so many related specs. After all, it was verbose! And you could make up just any tag name you wanted! But it turns out to scale well from a not-quite-simple tree data structure, with annotated nodes, all the way up to unfashionable Enterprisey uses. But scalability bothers people, because who knows what wacky thing someone else on the team is going to foist on you, so more restricted alternatives rise to popularity. If this is true, the rise of Java should correlate to (non-game) companies getting burned enough times on C++. (If you think about Safety, it makes sense. He wants you to use Java, because he can't hack reversing the polarity of the template stack flow.)
This sort of thing is practically destined to keep happening. More features generally cost more memory and processing time, or some other inconvenience like a compilation step, which is against the religion of some developers. Thus, lightweight versions of things spring up in opposition to whatever is perceived to be too heavy. Sometimes compilation is considered the lightweight alternative, since it's not done on every request.
Though sometimes many similar projects proliferate because they just aren't that hard. It's easier to write a web framework than to learn one, so there are a lot of them.
Made it out of the link forest and need something more to kill the time? Maybe you want to subscribe to my feed, or follow me on twitter.
Showing posts with label json. Show all posts
Showing posts with label json. Show all posts
Friday, December 2, 2011
Sunday, August 8, 2010
On XML and data formats
In many discussions of XML, there seems to be a faction of programmers who are completely dead-set against XML. They'll insist on JSON, or YAML, or any other cool technology that isn't supported in that 5-year-old version of whatever language your company is still running. The usual complaints leveled against XML-based formats are verbosity and the complexity of the DOM. (Sometimes, leading or trailing whitespace on element contents in pretty-printed XML will bite a project, but this never seems to come up in internet flamewars.)
The really young, or maybe just incurably naive, programmers will even chime in that anything that can be done in XML can be done, or even done better, in JSON. I even thought this once, until I tried to write a generic XML-to-JSON converter, which showed me how wrong I was.
The really young, or maybe just incurably naive, programmers will even chime in that anything that can be done in XML can be done, or even done better, in JSON. I even thought this once, until I tried to write a generic XML-to-JSON converter, which showed me how wrong I was.
Subscribe to:
Posts (Atom)