Archive for November, 2012

On the talismanic fight between RDFa and microdata

A new fight has broken out in specland, between the supporters of RDFa and supporters of microdata. Observers may be wondering why; both are methods of adding extra markup to existing content in order that machines may better understand the content. Semantic Web proponents (note capital letters) dream of a Web where all content is linked by said machines. Semantic Web sceptics have more humble aspirations of search engines better understanding micro-content (is this string of digits a book ISBN, or a phone number?).

RDFa was part of XHTML 2. It became a W3C standard (or, in their vernacular, a “recommendation”) in 2008. microdata was invented by Ian Hickson as part of HTML5 because he identified deficiencies in RDFa. microdata was subsequently modularised out of W3C HTML5, but microdata is part of HTML5; it validates, whereas RDFa doesn’t.

Note the history. Like football fights that break out because one guy called an opposing team fan’s pint “a pouff”, this isn’t about the actual slight at all; this is about the past, allegiances and alliances; it’s a clash of world views. This is XML versus non-XML; it’s the XHTML 2 gang against the uncouth young turks of HTML5. This is Rangers vs Celtic; it’s Blur vs Oasis; it’s Tiswas vs Swap Shop.

(Added 15:30 GMT: R/e my framing the current debate as a talismanic battle, I should point out that I don’t mean Manu (whom I’ve always found to be courteous, thoughful and a jolly good chap). Neither do I mean Marcos, who isn’t a WHATWG-er. But some of the discourse “cowardice”, “suck metadata and fade, for all I care” on one side, and “TimBL’s RDF temple priests still mad as hell” suggests some, er, partisan feeling going on.)

What follows is the observation of a layman; I’ve not used much structured content, so am not an expert (I once tried to use microformats for events at the Law Society, but their accessibility problems prevented it.)

In my opinion, the primary deficiencies of Classic RDFa are that it’s too hard to write. For professional metadata-ologists it may be simple (but, hey, those guys understand Dublin Core!). The difficulty for me as an HTML wrangler was namespacing, CURIEs, and triples. This is XML land, and most web authors are not particularly adept with XML.

There’s also the problem that in order to use RDFa properly, you needed an xmlns attribute which is separate from the content you’re actually marking up (you don’t anymore in RDFa 1.1, see Manu’s comment). In a world where lots of content is syndicated via machine, or copy and pasted by authors (many of whom don’t really understand what they’re copy and pasting), this leads to breakage as not all of the necessary moving parts get transferred to their new environment. Hixie wrote

Copy-and-paste of the source becomes very brittle when two separate parts of a document are needed to make sense of the content. Copy-and-paste is how the Web evolved, so I think it is important to keep it functional and easy.

microdata solves this problem. It’s also easier to write than Classic RDFa (in my opinion) although I’m still mystified by the itemid attribute. I intend to start using microdata on this site soon (in order to plug the holes left by removal of the HTML5 pubdate attribute).

I’ve been recommending that people use microdata. Its main advantages:

Manu Sporny understood the problem that RDFa is hard to author for those of us who find the best ontology is a don’t-ology. Almost a year ago, he set about simplifying RDFa and came up with RDFa Lite. RDFa Lite greatly simplifies RDFa; in fact, you can search and replace microdata terms with RDFa terms (see his post Mythical Differences: RDFa Lite vs. Microdata).

RDFa has multiple advantages, too:

It seems to me that developers should just choose the one that meets their project’s needs. Need valid code Don’t need “full fat” RDFa, need a JavaScript API? Choose microdata. Care about Facebook, don’t care about a JavaScript API? Use RDFa Lite.

The current fight, however, won’t allow that. The RDFa gang want to stop microdata going further in the standardisation process because RDFa became a Recommendation first, and microdata is quite similar to it. (This is a controversial perspective; see Manu’s comment.)

While I completely understand that two competing standards makes it harder for developers in the short term, I agree with Marcos Caceres (who isn’t a WHATWG/ HTML5 zealot) who counters Manu Sporny’s objection to microdata progressing thus:

I don’t see what it being a “Recommendation” has to do with anything – just because it’s a W3C Recommendation does not mean that RDFa has a monopoly on structured data in HTML. So, just because that spec reached Rec first doesn’t mean that it’s somehow better or preferable to any other future solution (including micro data). That would be like objecting to Javascript because assembler (or punch cards) already meet all the use cases…

I hope you will instead focus your energy on convincing the world that RDFa is the “correct technology” on its own merits and not place your bets on a mostly meaningless label (“Recommendation”) given by some (much loved, but) random standard organisation.

I see no technical reason to favour microdata or RDFa Lite; both do the job. So, developers; which tickles your fancies? RDFa Lite or microdata?

Reading List

NEWT

Industry

Misc


Hitler does Gangnam Style.

Reading List

HTML5 etc

Responsive Web Design

Mobile

Misc

Notes on Contents Strategy Forum 2012, Cape Town

I was fortunate enough to be invited to speak at Content Strategy Forum 2012 which was previously in Paris and London, and this year went to Cape Town. I used to be a content bloke; in fact, I now realise that at The Law Society I was a Content Strategist, there just wasn’t a name for it in 2008.

But that was four years ago, so for this conference I was firmly out of my [American accent] “comfort zone”. Fortunately, I had a preparatory natter with Rellington Annett-Baker to ensure my introductory HTML5 for content specialists talk was likely to hit their sweet spots and tickle their fancies. (It seemed to work.)

The conference was headlined by Kristina Halvorson, and Luke Wroblewski, both of whom seemed to disagree with each other. I’m not well-versed in Content Strategy schisms to have an opinion either way, although Luke’s assertion that we now have a write-read web rang true. Kristina is the godmother of Content Strategy, so her talk was a “state of the nation” speech from paper notes (she’d lost her laptop), largely about how she’d grown her agency to 28 people and then laid off all but five.

Other notable talks were by Razorfish’s Rachel Lovinger who talked about structuring content for re-use, using standards and responsive design in Content in the Age of Promiscuous Reuse.

Relly Annett-Baker’s “Guerillas in their midst” was a fun, British talk about guerilla content strategy. Relly is a black belt at on-stage swearing (I was on best behaviour; these are her friends).

Richard Ingram did an interesting talk about visualising data and recommended the really good Scraping for Journalists book which taught me loads in the first chapter.

John Alderman gave an entertaining talk on how to use Big Data. In it, he spoke about meet-ups where people discuss data they’ve collected about their own bodies. (Yup.) He’d probably be interested in Pete Fletcher’s sneezecount project documenting his sneezes since July 2007 (also see his 5 minute Ignite video On the Counting of Sneezes) and Manu Sporny open-sourcing his genetic data on GitHub.

Great thanks to the organisers: Kerry-Anne Gilowey, Rian van der Merwe, Nathan Blows and Irene Walker. Organisation was perfect; they even managed to get a Cheetah!

Bruce and Luke W stroking a cheetah

I’m no Content Strategist, so I might be entirely wrong, but it felt that this conference was somehow a pivotal event in the solidifying a community. It reminded me of the @media conference of 2005, in which loads of UK web developers first met each other and realised that there is actually a community of UK front-enders and we’re not just a collection of lonely weirdos who read A List Apart. Friendships began; businesses were formed, networks opened and a community came of age. I wonder if Content people in Africa will look back at CSForum 2012 like that.

South Africa

I stuck around in Cape Town for a while, hobnobbing with the great and the good, doing five press interviews, giving some tech talks for developers and business people at Saatchi and Saatchi and the workplace of an old friend Allan Kent who’s Head of Digital at South Africa’s leading media group, Primedia.

An impromptu meet-up was arranged by a Sean O’Connell, a front-end dev, and hosted by Paul Cartmel at New Media Labs (thanks chaps). It was over-subscribed, and too many pizzas and beers were bought; we soldiered on, drinking too much beer and eating too much pizza. (Banana on pizza is wrong, by the way).

I did a talk on why standards are great and good for business (sorry about ugly slides; there wasn’t much time and I preferred gawping at penguins, Chapman’s Peak and brunching with beautiful people to wrangling presentation software!).

In amongst meet-ups and press interviews I did some sight-seeing, mostly under the kindly protection of Allan and saintly Wendy who drove me round to look at Cape Point, Simons Town, Kommetjie, Boulders and other gorgeous places. Their hospitality meant I saw so much I wouldn’t otherwise have done. Thanks so much to both of them.

On my last day, I skived emails after the last press interview and went to Robben Island where the apartheid-era political prisoners were kept. Having been to Auschwitz and Cambodia’s killing fields this year, I didn’t need another reminder of how vile people can be to each other. One redemptive thing about Robben Island, though, is that there are still ex-prisoners and ex-guards living on the island, giving tours around the prison.

On my last night, South Africa’s leading pointillist painter, Gavin Rain, picked me up in his posh car and we drove to Camps Bay where all the beautiful people go. Unfortunately, I was so affected by some twilight Death Pollen that I had to wear my shades all night (not uncommon in Camps Bay). But it did mean my attempts at mild flirtation with the gorgeous Kenyan waitress came to naught, as she doubtless thought Gavin and I were a gay couple splitting up and that I was crying in grief.

My guidebook – which should be renamed “The Alarmist Guide to Cape Town” – had cautioned me never to step out of my hotel or I’d have my kidneys removed. I never felt at all threatened in Cape Town’s CBD. In fact, just the opposite; it was vibrant, friendly and fun.

I don’t know what I expected of South Africa. I suppose I imagined lots of grumpy Afrikaanas trying to pretend they’d never been racist, and desperately poor black people. There certainly are many desperately poor black people; white South African households’ income is six times higher than black ones according to the latest census. And it seems to me that the elder statesmen like Mandela, Sisulu etc are gone, leaving a outrageously corrupt group governing the country.

But it felt to me (from my admittedly brief visit, cocooned in nice hotels in a prosperous city) that South Africa is on its way up, rather than down to Zimbabwe-like failed statehood. The workplaces I visited were highly multi-racial, as you’d expect given the demographics but as you might not expect given the recent history of the country.

Cape Town is probably the most beautifully situated city I’ve visited, with excellent cuisine (mmm, ostrich steaks and Bunnychow). All that, plus I got to talk to interesting people about cool stuff meant that I had a splendid time. Thanks so much to all those I met who made it so memorable.

Thanks, Yanks

The re-election of Obama is good news, I suppose.

Personally, I think he seems like a decent man, and it’s good to have a black man in the White House. But, wider than that, I don’t care what America votes for itself. If you want god mentioned all the time in politics as well as in churches, that’s up to you. If you like to pretend that judicial murder acts as a deterrent to crime, or that adequately looking after the sick and poor is socialism, and view Roe vs Wade as evil rather than a basic human right, that’s up to you. I’m appalled when loopy theocracies like Iran and Saudi impose medievalism on their citizens, but you seem to like this stuff; you vote for it freely and fairly, and that’s your right.

But Mr Obama wants to rein in your military. Mr Romney was opposed to cuts. This matters to me because American military adventurism affects people outside your borders. As the old saying goes, to a man with aircraft carriers and cruise missiles, everything looks like a cry for intervention.

So if the re-election of Mr Obama means you’ll spend your money making life better inside your own borders rather than playing chess with other countries, we’re all better off.

So, thanks.

Reading List

HTML5, CSS, NEWT

Misc