Saturday, September 29, 2007

Microformats: One Step towards Semantic Web (Part 1)

So what is really Semantic Web? Well, Semantic Web is an extension of the World Wide Web in which content can be expressed in a format that can be read and used by software not only by humans, to facilitate the searching, sharing and integration of information. In simple words it is a way to standardize the data and information representation over the world wide web, so that software would be able to understand its semantics without the need of complicated intelligent software. There have been several technologies that drive the road to semantic web like Resource Description Framework (RDF) and Web Ontology Language (OWL).

Semantic Web is one of the theories that Tim Burners Lee the father of the World Wide Web has been dreaming about since he launched the first website in the history in 1991. He had a vision towards this giant network that it shouldn't be a human-human communication only, machines should have a role too. His exact words were "a single Web of meaning, about everything and for everyone.". He made his idea available freely with no patent, so they can be easily adopted by anyone.

During the keynote at Microsoft MIX06, Bill Gates said, “We need microformats and to get people to agree on them. It is going to bootstrap exchanging data on the Web . . . we need them for things like contact cards, events, directions.”



What are Microformats?

Microformats are, according to the definition of microformats.org,

“Designed for humans first and machines second, microformats are a set of simple, open data formats built upon existing and widely adopted standards. Instead of throwing away what works today, microformats intend to solve simpler problems first by adapting to current behaviors and usage patterns (e.g., XHTML, blogging).”

In another words, it is a web-based data formatting methodology that re-use existing content as metadata, using only XHTML and HTML classes and attributes. So that human still be able to understand it as they used to and software agents can process it easily to extract the information they want.

Microformats might catch up with the web development community faster than the RDF or OWL. As it is build on the existing skills of web developers. It doesn’t require developers to learn whole new technologies, throw away their existing code bases, or wait years for browser developers to catch up and actually implement support for the technology. Microformats simply use features of HTML that have been around for years and are familiar to most web developers,

Current microformats allow the encoding and extraction of events, contact information, social relationships, and so on. More are being developed.

Microformats uses XHTML and HTML standards allow for semantics to be embedded within the attributes of markup tags. Microformats indicates the presence of metadata using the following attributes class, rel and rev.

Let us see an example of microformats to understand how it works, the following example is how to use microformats to describe contact information:

<div class="vcard">
<div class="fn">Fady Younan</div>
<div class="org">ITWorx</div>
<div class="tel">000-555-1234</div>
<a class="url" href="http://www.fady-younan.com">http://www.fady-younan.com</a>

</div>


Another example of how describe geographic information:

<span class="geo">
<span class="latitude">28.47</span>,
<span class="longitude">19.89</span>

</span>


If you haven't notice it uses the same XHTML and CSS to embed semantics in the web page, it uses the class "geo" to describe that is a geographic information, latitude and longitude to describe the co-ordination and so on ...

Here is list of some of the available microformats and there are others under development:
  • hCard: describes the contact information for people or organizations
  • hCalendar: describes information about events such as conferences,meetings and parties
  • XFN: describes the relationships between people.
  • hReview: describes the reviews for movies, books .. etc.
To be continued ...

No comments: