I've done quite a bit of research but I can't understand the exact relationship between the 3. Also, now that W3C has officially recognised RDFa, would you recommend it over Microdata, taking into consideration that it matches Microdata's features and more?
RDFa (Resource Description Framework in Attributes) is a type of data format recommended by the World Wide Web Consortium (W3C) for embedding RDF statements in HTML, XHTML, and various XML dialects. Programmers use the framework (RDF) to further specify web content with metadata.
<sarcasm>I can't imagine what you find so confusing</sarcasm> (edit: these tags were invisible before)
Very briefly:
Less briefly, RDF came from attempts to make data 'webby'. There was even a plug-in for browsing RDF's precursor MCF (from Apple, curiously). The data model was designed so that you could write what you want without having to pre-arrange how to column names or key meanings with everyone else on the web. RDF was standardly written (serialised) using XML (although other, more pleasant, formats are available).
So in this world you might have a readable homepage (me.html
) and a data homepage (me.rdf
) for machines to scoop up. Those machines won't understand the meaning of <p>I live in <a href="http://example.com/Chicago">Chicago</a></p>
, but they might be able to use :me ex:livesIn <http://example.com/Chicago>
if they look up 'livesIn'.
Microformats also tries to make data 'webby', or perhaps that should be the web 'data-y'. The insight here is that there's a lot of data in web pages, between the prose. If you have a few hints a machine can work out that that piece of html above is basically an address. Those hints are microformats. Typically they use conventions around html class names to indicate that the content is more than text.
So microformats don't need a separate web page for machines. But microformats only cover a few types of data (addresses, friend links, position...) because of the way they work. Each is a particular convention which needs to be agreed. Used without care they can mix badly, too.
RDFa is an attempt to get both the flexibility of RDF and the simplicity of microformats. Microdata was a response to RDFa, but with a different data model (roughly arrays and hashes rather than a relational model). Unlike microformats neither dictate what sort of information is provided, just how it is encoded.
To complete what's missing we now have schema.org, which is an initiative from the big search engines (Google, Bing, Yahoo, Yandex) to index web data. schema.org coordinates those meanings so the search engine knows that, say, events have locations. Microdata was originally used by schema.org, but now both microdata and RDFa are supported.
I'd ignore microformats these days and go for schema.org. My personal taste is the RDFa encoding, but either it or microdata should work fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With