Hacker News new | ask | show | jobs
by jerf 4630 days ago
"I personally think the second way is saner, if you accept that you're closing the door on one of the main features of XMPP provides - interoperability between a diverse set of clients."

Might I just add that we are in the context of discussing an article in which that feature was just used. A new namespace was defined by fanout.io and deployed, and it's all perfectly standard and working.

Those who think that XMPP can just drop in JSON don't understand how extensively XMPP uses XML, and probably don't fully understand everything the XML stack adds.

The history of XML in a nutshell is that it was designed for documents, but got used by a lot of people for data. For data, XML was massive overkill. The masses, as usual, overreacted and declared that XML was overcomplicated and bloated and useless. This is not true. It's actually a very nice set of standard functionality to use... when you need it. If you don't need extension namespaces or tag attributes in addition to contents (two dimensions of attributes, basically) or markup in your text, etc etc, don't use XML. On the other hand, if you do need those things, equally strongly, don't use JSON! It turns out XMPP uses all of the above, plus some more. Those who propose switching it to JSON, IMHO, merely demonstrate that they don't understand the tradeoffs in question, and probably have an irrationally-strong aversion to XML.

I, ironically, say this in the context of someone who in my job have almost always called for XML to be replaced by JSON. This is because in those cases, it was the right answer. I suppose, sooner or later, the opposite will happen.

3 comments

100% agreed, and I'm in a similar position. I often mention to people that XMPP is one of the few places where I think XML is actually the right tool for the job, and is actually being used properly.

This is rather in contrast to those infamous "enterprise" frameworks, APIs and protocols that standards committees shoe-horned XML into as a way to put another tick in another box, that we have all grown to hate. Long may the rebellion continue!

+1. Thanks for putting it so clearly.

An (old but) related article: http://metajack.im/2010/02/01/json-versus-xml-not-as-simple-...

It's refreshing to see someone talk about this in terms of actual tradeoffs rather than fashion trends, thanks.