Microformats

(Cross posted in the web design blog) Quick rant. It seems there is a lot of propaganda which is pushing Microformats as the “new great thing” on the web. As a result of this, I tried to institute the hCard / vCard microformat (find out more at microformats.org) on a web site currently being developed.

Now the format itself is (eventually) easy enough to get to grips with and it is possible that it could be useful. Being able to generate a human and machine readable address book entry from the same data seems like a brilliant idea. Putting it into practice is somewhat harder.

In a nutshell you mark up your data with SPAN or DIV tags (or whatever) which has a class set to match the vCard fields (eg “fn” for name, “org” for organisation etc). This is fairly straight forward, although it can generate lots of span tags if your contact details are even slightly complicated. When all this is done, you are left with some (X)HTML markup which can be styled as you see fit.

That was the easy bit.

Having done all the microformat marking, you are left wondering if it has “worked.” Is the data actually machine readable in the manner you would expect? The (X)HTML is, but that is no big deal – if the machine readable bit isn’t, all that span effort went to waste.

Now, moving to the dreaded Technorati can help. At the “Technorati Kitchen” there is a page which converts the mark up into a .VCF file which you can down load and try to import into what ever address software you use (Outlook, Windows Address book and the Nokia Address book were the ones tried today). The problem is the VCF you get to download wont open in anything. If you open it in a text editor it “looks” legitimate but no address software seems to like it. It is not just the mark up I made either, following links from the “examples in the wild” page took me to sites like “Mike Rumble – Contact” which downloads a broken VCF thanks to Technorati.

In the end, I had to leave the markup in (hoping it was working) and manually create a functional vCard – which now works fine in all the applications available to test.

Hopefully there is a better solution and if anyone knows it, PLEASE let us know!