Sunday, 18 January 2009

Open standards ... a cautionary tale

Added by Mandy Shaw, about 1 year ago.

Time for another rant ...

I spend a fair amount of my spare time acting as webmaster for my husband's website, which sells downloadable sheet music. Yesterday we came up with yet another cunning marketing plan, involving distributing an electronic score packaged with associated 'help' information, for offline use. I volunteered to work on the technicalities of this, hence the following cautionary tale.

I won't bore you with the details, nor would they be relevant, but each electronic score is a separate file. Challenge number one is making it readily viewable and associating it with text and images while still allowing playback and printing of the score. The standard method is to invoke score view/playback/print from an ordinary web page (HTML file), which means embedding a reference to the score within the HTML. So we have two files (score and HTML) which have to go hand in hand. You can't just email the two files to someone as attachments and expect the setup to work when the recipient clicks on one of the attachments - it won't - he/she would need to save both attachments to the same folder and then launch the HTML file. Let's be realistic, I wouldn't go through that rigmarole if it were me.

So, challenge number two is to encapsulate the stuff in one file, somehow, so it can be launched straight from an email.

Enter open standards ... I know I am naive, but my immediate thought was to go to and find out what clever stuff I could do within the HTML open standard to solve the problem.

I found a thing called a 'data URI' which would allow me to insert an encoded version of the score straight into the HTML - no second file to ship, so problem solved. Hurrah.

Except .. I then tried it out, and whatever data URI I tried, it wouldn't work at all for me. Enter Google. It transpires that (wait for it) the current HTML open standard is supported by nearly all up-to-date browsers ... but Microsoft do not support data URIs in either IE6 or IE7, and I can't find any reference to any plan to support them in the future, either. Microsoft favours another standard (MHTML) for this sort of encapsulation, but that is not agreed as an open standard and doesn't look like being so at any point soon.

So challenge number three will be to bite the bullet and write HTML that uses MHTML for Microsoft browsers and data URIs for the rest. That's life I suppose.

That's the cautionary tale, here (resisting the temptation to comment on Microsoft's attitude to open standards) is one general point which I thought interesting. When I Googled for help, I found three different types of content: a) people saying 'why would you want to do that anyway?' or 'data URIs are useless' and providing no useful input; b) people saying 'get your users to install Firefox' and providing no useful input; c) people with the same problem as me, none of whom had received any useful responses. I found all this rather depressing, since it gives me the impression that the world is full of developers with no ability either to think laterally or to see anything from the viewpoint of an ordinary user with no particular interest in IT. (Maybe the other ones are too busy having a life to respond to forum postings?)

Rant over for now ... I'd be interested in other people's real life experiences with the meaningfulness or otherwise of open standards.

Mandy Shaw, about 1 year ago
It's a question of perception. No-one expects Word to be an open standard - it's a de facto standard simply because of its near universal take-up, but it's 100% proprietary. HTML has an agreed open standard, and it seems reasonable to expect that Web browsers will follow this open standard. On this point, at least, the most popular browser clearly diverges from the open standard and, on the current evidence, intends to continue to do so. But I don't know why I expected otherwise, really.

... another comment ...

No comments:

Post a Comment