1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
Tracking social relationships on the web has thus far primarily been something that happens on specific sites like MySpace, Facebook or Friendster. Within those sites you can meet and define relationships with other sites members.
But what about the larger web? If you have a blog you may keep a "blog roll" or list of sites that you like, in the a sidebar. Some of those sites may be written by your friends; surely there's a way to define relationships between people without joining the latest fad social network?
And in fact there is, it's known as XFN or the XHTML Friends Network. Using a series of different <code>rel</code> tags in your markup you can indicate who your friends are what the nature of your relationship is.
While not officially part of Microformats, XNF uses some microformats to define relationships and the two groups share similar goals.
##XFN Overview##
You have blog. Your best friend has a blog. Your blog links to your friend's blog, but beyond that there's no way to indicate that that person is your friend. Let's say you link to your friend's blog like so:
<code><a href="http://yourfriendsblog.net/">Bill</a> </code>
And here's what the same link would look like after we drop in some XFN markup:
<code><a href="http://yourfriendsblog.net/" rel="friend met">Dave</a> </code>
As you can see we've just added a rel tag and defined Dave as a friend that we've met. The XFN specification has a fairly complete range of options for defining various types of relationship. Some of the more common attributes are:
# friendship (at most one): friend acquaintance contact
# physical: met
# professional: co-worker colleague
# geographical (at most one): co-resident neighbor
# family (at most one): child parent sibling spouse kin
# romantic: muse crush date sweetheart
# identity: me
##What XFN Does##
The primary benefit of XFN is that page scraping tools like spiders can crawl through your code and pick out various relationships you've defined. It gets even more interesting when those spiders follow your links, crawl your friend's site and find a similar link leading back to you.
The spider then knows that the relations is symmetrical. In other words, you call Dave a friend and Dave calls you a friend and that relationship is confirmed. When symmetry is established page crawlers can give the relationship added validity.
Symmetry is also useful with the <code>rel="me"</code> tag since it allows you to claim all the various pages you may have. Sites like Flickr allow you to enter your blog on your profile page and then mark that up with a <code>rel="me"</code> tag.
If you then link to that same page from your blog, the relationship is symmetrical and a claim of ownership can be assumed. If someone else points to your blog from their Flickr page trying to claim your blog as their own, the lack of a reciprocating link tells a web crawler that the claim is suspect and indexing services will ignore it.
##Using XFN##
Hand coding your XFN links isn't that hard, but there is a JavaScript widget that can [http://gmpg.org/xfn/creator generate the links for you] if you like.
So far the primary consumers of XFN have been search engine spiders and some attempts at open social networks like the [http://code.google.com/p/diso/ DiSo project], but Google recently released an oft overlooked [http://code.google.com/support/bin/topic.py?topic=13821 Social Graph API] that relies heavily on XFN data.
The Social Graph API is somewhat limited at the moment, but there are some interesting tools you can use to see what sort of relationships you might already have defined. To see what sort of things are possible, have a look at the [http://code.google.com/apis/socialgraph/docs/examples.html example applications].
##Limitations##
While there are reasonably wide range of options for defining relationships there is one common sort of relationship in the web that XFN doesn't account for -- being a fan of someone. That is, while I have never met Ze Frank, for example, I am a fan of his work and XFN doesn't offer a way to define that relationship.
However there is a proposed solution, though for the time being it only allows the reverse. For instance if someone is a fan of you, you can add a <code>rel="fan"</code> tag to your outbound link. Unfortunately the reverse isn't possible.
There are of course further fringe cases which also can't be defined (one particular instance, a child with legal guardians rather than parents has been accepted and will be implemented in the future), but the XFN group has does a good job of preventing the list of definitions from getting too out of hand. If you have a compelling argument for including something, you can always join the group and [http://microformats.org/wiki/xfn-issues add your suggestions].
|