Friend of a Friend (FOAF) in C#


I just want to say up front that I'm not a big fan of formats like this and I'll get into why in a bit but I had to create a simple parser so I decided to share the code. Anyway, FOAF (otherwise known as Friend of a Friend) is a very basic, machine readable markup using RDF/XML to describe people, whom they are friends with, groups they're in, etc. In theory it could be used to allow social networks connect to people outside of their network, connect IM clients, connect... well... anything where a person's basic information is needed. Thankfully you can start using the format immediately:

FOAF.zip (4.15 kb)

And yes, it has the MIT license at the top (which means it's going in my utility library). Anyway, it's commented and it does work for basic items. However, I didn't implement certain items, such as IM client IDs, blog pages, etc. (nor the DNA checksum...) But it does the basic phone number, email address, name, people known, etc. It also works with the FOAF-a-matic.  So if you created a document using that, it will read it.

Now before you get all happy with it and think that you're going to create a social networking site and it will talk to everyone... I've yet to see it used by a large enough groups of sites to make it worth while. You add in the fact that the format is mostly designed for machines only (unlike hCard and XFN), and that there are more widely used concepts like OpenID, and you end up with a format that is OK but you can live without it. I mean Google's Social Graph API works with the format (which is why I created the parser), but it also works with XFN, and XFN can be stylized using CSS, embedded in a web page, etc. And like I said, you have hCards which are gaining momentum, so I just don't see the need yet for FOAF... Never know though as it might catch on more and more as time goes on (I mean I remember a time when people said that XML wasn't going anywhere). Anyway, try out the code, leave feedback, and happy coding.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,
Categories: C# | Web Design
Posted by James Craig on Wednesday, December 03, 2008 10:48 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Related posts

Recent comments

None

Calendar

<<  January 2009  >>
SuMoTuWeThFrSa
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567

Sponsors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009