To Incorporate or to Extend: That is the Question!
by ZetaGecko | Add Your Comments | Atom/RSS
Am I contradicting myself again? Yesterday the question was "to embrace or to extend?" No, I'm just talking about a related, but separate issue. When a digest format doesn't support something you want or need to do, do you try to get it into the spec, or create an extension?
One of the current issues under consideration on the Atom syntax mailing list is whether Atom should have native support for binary uploads (ie. a method to upload images, video, etc. without having to encode it). The main concern seems to be that the standard method of encoding (Base 64) increases the size of the data by 33%. When uploading images and video from mobile phones, where users are charged by the amount of bandwidth used, this can be expensive. And with the generally slow upload speeds for such devices, it can be time consuming as well. Clearly, it would be nice to have a way to upload files without the extra 33%. But does this belong in the core specification?
I'd say no. Atom, and all major digest formats, are XML based (though some are more strict about XML compliance than others). Any method of binary upload must necessarily be non-XML compliant, because binary files may contain bytes or sequences of bytes that are not part of any character set. Also, if certain characters that have special meaning in XML (<, >, &...) must be encoded some way or other in order to be included in an XML document. That being the case, I'd have a hard time voting for any method that incorporated exceptions to XML compliance into the core document format.
Essentially what is called for is a non-XML method of transferring binary data, with related meta-data (filename, modification date/time, etc.) being transferred in an XML format. The XML and non-XML chunks of data will most likely be lumped together in a single data stream, with the XML coming first, followed by the binary data, after the XML has described what's coming.
Looking at the broader issue, when considering whether to incorporate a feature into the core or to add it via an extension, one should consider:
• whether the feature will be widely used, or required only by a small minority of users.
• whether the feature requires significant divergence from the philosophy guiding the core specification.
• unfortunately, one other issue often needs to be considered (this is not comment on Atom): whether the persons on community controlling the spec are open to suggestions or not.