BOOKMARKS USING XFOLK

I have rewritten the markup for the list of bookmarks on my links page according to xFolk, a draft Microformat specification.

Before I implemented xFolk, my list of bookmarks was a simple unordered list with each list item coded as follows:

  1. <li><a href="http://9rules.com">9rules</a>:
  2. a community of weblogs on a variety of topics</li>

Implementing xFolk involved the addition of the class xfolkentry to the list item, the addition of the class taggedlink to the link, and the addition of a span with the class description to the bookmark’s description. The markup for the new list item is the following:

  1. <li class="xfolkentry">
  2.   <a class="taggedlink" href="http://9rules.com">9rules</a>:
  3.   <span class="description">a community of weblogs on a variety of topics</span>
  4. </li>

rel="tag" can also be added to links to tags associated with the bookmark.

You can read more about the rationale for and specifics of xFolk on the Microformats wikior on Bud Gibson’s blog post. You can also view the XMDP for xFolk, which further describes the attributes that should be used.

WHY USE MICROFORMATS?

Microformats are a set of human- and machine-readable data formats built upon existing and widely adopted standards. Basically, they involve using the addition of standardized class names, rel attributes, and design patterns to XHTML markup to solve simple, specific, documented problems.

I have implemented several Microformats on this site, and at this point you may be asking “why use Microformats?”

In response to this question, Andy Mitchell of whymicroformats wrote:

Microformats can be used to let users easily extract people/event information from your website for their organizer software… in the near future, Microformats will help both you and your work be better ranked by conventional search engines like Google [and will allow your data to be aggregated by other sites and downloaded/imported by users].

Furthermore, Arve Bersvendsen writes that:

…given the the opportunity to mark up your human presentable content (read: HTML) with a well-defined microformat, you should. Mostly because writing microformat parsers is extremely easy.

He goes on to present a 13-line hCalendar parser that extracts the date, time, summary, location, and URL of an event from a HTML document.

Many others have written parsers as well; there are several plugins available for the Firefox web browser, and coming versions of Firefox will add extended support for Microformats. According to Mozilla developer Alex Faaborg:

future Web browsers are likely going to associate semantically marked up data you encounter on the Web with specific applications, either on your system or online.

In conclusion, Microformats are easy to implement (they only require the addition of a few semantic elements to a page’s markup) and present an huge potential for extension and aggregation of the data. By using Microformats, your page’s markup becomes more human- and machine-readable.

CREATING AN OPENID

OpenID is a decentralized authentication system that was created by LiveJournal and is now being developed as an open standard with the help of the Apache Foundation. Anyone can create an OpenID, and the number of sites that allow users to use their OpenID to log in is continually growing.

An OpenID is simply a URL. My OpenID is dragotown.com, the address of my weblog. I can use it to sign in to any site that supports OpenID, and because I’m the only person with control over my weblog’s homepage I’m the only person who can use that identity.

I followed the instructions in Simon Willison’s article, How to turn your blog in to an OpenID, and was able to create and begin using my OpenID very quickly.

There are really only two steps to designating the URL of your website as your OpenID. First, you sign up with an OpenID provider. A few popular providers are LiveJournalVoxVeriSign Labs, and MyOpenID. Note that since OpenID is decentralized, anyone can set up their own server, however these services offer to host your OpenID for you.

Next, you point your site to your chosen OpenID server by adding the appropriate code to the header of your site’s HTML. I chose claimID, so I added the following code:

  1. <link rel="openid.server" href="http://openid.claimid.com/server"/>
  2. <link rel="openid.delegate" href="http://openid.claimid.com/drago"/>

That’s it! Now, when you go to a site that allows you to log in using your OpenID, you simply enter your OpenID and you will be redirected to a page (on your OpenID server) where you enter your account’s password. Then, you are directed back to the page you were browsing.

There are many benefits of OpenID. A standardized login system means you don’t have to create an account at every site you want to log in to. Instead of remembering multiple usernames and passwords, each time you want to log into a site you are sent to your OpenID server. Also, the OpenID server can share information, such as your name, email, or address, with sites that support OpenID and which you have authorized to access the information.