SIOC implementation for BlogEngine.NET

February 8, 2008 | Uncategorized | 58 Comments

Update: This is now part of the Data Portability Pack for BlogEngine.NET

A major feature of BlogEngine.NET is that it supports a lot of open standards. Keeping with this, I’ve setup an initial implementation of SIOC for BlogEngine.NET. SIOC (Semantically-Interconnected Online Communities) is an extension of RDF which goes beyond RSS in that it describes not only the content of a website, but the connections between site content, users on the site, and another websites. While RSS has one big document for recent content, SIOC splits up its data into (1) a site profile, (2) profiles for authors, (3) profiles for posts, and (4) profiles for comments. Each of these not only lists the author’s name, but also includes FOAF (Friend of a Friend) data to help identify users across the Internet via a hashed email address. If all sites were SIOC/FOAF enabled, you could theoretically search an aggregator site (like Technorati if it supported SIOC) for all posts and comments by a given user within a set of blogs, forums, or other websites. For more information on this, see my post on Data Portability standards.

Site Profile

To get a feel for the data, here’s what the site profile looks like (note: I’ve tried to match the Word Press SIOC plugin URL conventions as much as possible)
http://johndyer.name/sioc.axd?sioc_type=site

<rdf:RDF>
<!-- users -->
<sioc:Usergroup rdf:about="http://localhost/johndyer/sioc.axd?sioc_type=site#authors"> <dc:title>Authors at "John Dyer"</dc:title> <sioc:has_member> <sioc:User rdf:about="http://localhost/johndyer/author/John+Dyer.aspx" rdfs:label="John Dyer"> <sioc:see_also rdf:resource="http://localhost/johndyer/sioc.axd?sioc_type=user&amp;sioc_id=John+Dyer" /> </sioc:User> </sioc:has_member> </sioc:Usergroup>
<!-- site info -->
<sioc:Site rdf:about="http://johndyer.name/"> <dc:title>John Dyer</dc:title> <dc:description>ASP.NET, Flash, and JavaScript from FreeTextBox and Dallas Seminary</dc:description> <sioc:link>http://johndyer.name/</sioc:link> <sioc:host_of>http://johndyer.name/sioc.axd?sioc_type=site#webblog</sioc:host_of> <sioc:has_group>http://johndyer.name/sioc.axd?sioc_type=site#authors</sioc:has_group>
</sioc:Site>
<!-- blog info, posts--> <sioc:Forum rdf:about="http://johndyer.name/sioc.axd?sioc_type=site#webblog"> <sioc:name>John Dyer</sioc:name> <sioc:link rdf:resource="http://johndyer.name/sioc.axd?sioc_type=site#webblog" /> <sioc:container_of> <sioc:Post rdf:about="http://johndyer.name/post/2008/02/BlogEngineNET-Extension-Flash-Video-Player.aspx" dc:title="BlogEngine.NET Extension: Flash Video Player"> <rdfs:seeAlso rdf:resource="http://johndyer.name/sioc.axd?sioc_type=post&amp;sioc_id=06af08e0-c4eb-421c-9e18-b618358d33ca" /> </sioc:Post> </sioc:container_of> </sioc:Forum> </rdf:RDF>

This describes (1) the users on the site (sioc:Usergroup) which would be blog authors, (2) the site in general (sioc:Site), and (3) and displays the content (sioc:Forum). Each of these has links to other SIOC documents for the user and then for the posts.

Post Profile

Here’s what a post looks like:
http://johndyer.name/sioc.axd?sioc_type=post&sioc_id=612564cd-3cfa-42b5-92e9-44beb52f7cd5

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rss="http://purl.org/rss/1.0/" xmlns:admin="http://webns.net/mvcb/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content" xmlns:sioc="http://rdfs.org/sioc/ns#">
  <foaf:Document rdf:about="http://johndyer.name/">
    <dc:title>SIOC post profile for "John Dyer"</dc:title>
    <dc:description>A SIOC profile describes the structure and contents of a weblog in a machine readable form. For more information please refer to http://sioc-project.org/.</dc:description>
    <foaf:primaryTopic>http://johndyer.name/post/2008/02/Website-Break-Coke-vs-Diet-Coke-vs-Coke-Zero.aspx</foaf:primaryTopic>
    <admin:generatorAgent>BlogEngine.NET SIOC Generator (1.0) by John Dyer</admin:generatorAgent>
  </foaf:Document>
<!-- post data -->
<sioc:Post rdf:about="http://johndyer.name/post/2008/02/Website-Break-Coke-vs-Diet-Coke-vs-Coke-Zero.aspx"> <sioc:link rdf:resource="http://johndyer.name/post/2008/02/Website-Break-Coke-vs-Diet-Coke-vs-Coke-Zero.aspx" /> <sioc:has_container rdf:resource="http://johndyer.name/sioc.axd?sioc_type=site#webblog" /> <dc:title>Website Break: Coke vs. Diet Coke vs. Coke Zero</dc:title> <!-- post author -->
<sioc:has_creator> <sioc:User rdf:about="http://johndyer.name/author/John+Dyer.aspx"> <rdfs:seeAlso rdf:resource="http://johndyer.name/sioc.axd?sioc_type=user&amp;sioc_id=John+Dyer" /> </sioc:User>
</sioc:has_creator> <foaf:maker> <foaf:Person rdf:about="http://johndyer.name/author/John+Dyer.aspx" foaf:name="John Dyer"> <foaf:mbox_sha1sum>3eb435778fafc3efde35fba2ca731c6d3234178f</foaf:mbox_sha1sum> <foaf:homepage rdf:resource="http://johndyer.name/" /> <rdfs:seeAlso rdf:resource="http://johndyer.name/sioc.axd?sioc_type=user&amp;sioc_id=John+Dyer" /> </foaf:Person> </foaf:maker>
<dcterms:created>2/1/2008 4:40:53 PM</dcterms:created> <sioc:content> Today, we decided to take a break from web development and do something truly important: a taste test. Tim, Adam, Brian, and I wanted to see if we could identify Coke, Diet Coke, and Coke Zero in a blind test. We each had three cups that another team member had setup. We tasted each drink and tried to match the drink with the cup and also mark our favorite. Tim is the narrator and then the participants from left to right are: John (me), Adam, Tim, and Brian. </sioc:content> <content:encoded>&lt;p&gt;Today, we decided to take a break from web development and do something truly important: a taste test. Tim, Adam, Brian, and I wanted to see if we could identify Coke, Diet Coke, and Coke Zero in a blind test. We each had three cups that another team member had setup. We tasted each drink and tried to match the drink with the cup and also mark our favorite. Tim is the narrator and then the participants from left to right are: John (me), Adam, Tim, and Brian.&lt;/p&gt;</content:encoded> <!-- categories and tags -->
<sioc:topic rdfs:label="Off Topic" rdf:resource="http://johndyer.name//category/Off Topic.aspx" /> <sioc:topic rdfs:label="challenge" rdf:resource="http://johndyer.name//?tag=/challenge" /> <sioc:topic rdfs:label="soda" rdf:resource="http://johndyer.name//?tag=/soda" />
<!-- comments --> <sioc:has_reply> <sioc:Post rdf:about="http://johndyer.name/post/2008/02/Website-Break-Coke-vs-Diet-Coke-vs-Coke-Zero.aspx#id_a82699f9-77e2-460d-b3b1-d1d470180df9"> <rdfs:seeAlso rdf:resource="http://johndyer.name/sioc.axd?sioc_type=comment&amp;sioc_id=a82699f9-77e2-460d-b3b1-d1d470180df9" /> </sioc:Post> </sioc:has_reply>
<!-- outbound links --> <sioc:links_to rdf:resource="http://www.cokezero.com/" rdfs:label="Coke Zero" /> </sioc:Post> </rdf:RDF>

This one also has a “document” description (which I left out on the site profile) and then has information about the post including its author (both sioc:has_creator and foaf:maker which has my email as a SHA1 hash), content (sioc:content and content:encoded), categories (sioc:topic), outbound links (sioc:links_to), and then links to the comments for the post (sioc:has_reply)

Download and Installation

  1. Download BlogEngine.NET SIOC extension
  2. Copy the three files into the \App_Code\Sioc\ directory
  3. Add the following line to your web.config
    <add verb="*" path="sioc.axd" type="SIOC.SiocHandler, App_Code" validate="false"/>

Update: This is now part of the Data Portability Pack

What’s Next?

  1. This extension will add a <link> tag to your header, but you view it directly at: http://yoursite.com/sioc.axd
  2. Explore the SIOC file at:  http://sparql.captsolo.net/browser/browser.py?url=http%3A%2F%2Fjohndyer.name%2Fsioc.axd
  3. An SIOC explorer is also available here which allows you to search and sort the data from among several sites: http://www.activerdf.org/sioc/

58 responses to “SIOC implementation for BlogEngine.NET”

  1. Chris says:

    I noticed that your extension, while very cool, breaks the syndication portion of BlogEngine.Net. I haven’t had time to run down what’s going on but you can see the effect by looking at http://johndyer.name/syndication.axd.

  2. John Dyer says:

    Thanks Chris. It’s fixed now.

    The SiocExtension class is using Post.Serving event to add the SIOC <link> to the header. This is not terribly efficient, but I don’t think there’s another event that can be used for doing this.

  3. Chris says:

    Sweet. Works as advertised. Thanks for the update.

  4. yoav ram says:

    hi john
    i’ve been looking into your rdf output.
    when exporting comments, why don’t you connect them to the post they comment with sioc:reply_of (with the post rdf url as the object)?
    your only connection is via the sioc:link to the comment html, but that is not enough.
    if one wants to know that s comment is a comment just by looking a the rdf, one must know it is a reply_of another post!
    it’s is a major problem, i think.
    another major problem is your implementation of foaf:primaryTopic.
    i think you should use a rdf:resource as the object and not a literal.
    take a look here for examples to correct implementations (to my understanding) of the spec:
    http://www.johnbreslin.com/blog/index.php?sioc_type=comment&sioc_id=554475

    (besides the fact that they use a reply_to instead of a reply_of!!)
    besides all that – good job and thanks for sharing!
    yoav

  5. yoav ram says:

    hey
    also noticed you haven’t got a time and date field such as dcterms:created…

  6. Alojaweb says:

    this is interesting, I’m going to try.

    Thanks Jhon.

  7. Dieran Blog says:

    I came lately to your website and have been reading along. I thought I would leave my initial comment. Keep writing, cause your posts are impressive! Doesn’t it take up a lot of time to keep your blog so fascinating

  8. didn’t try to do it your way, i may just as well do now. thanks for the idea.

  9. Nick Reviews says:

    How simple your method is and how effectively it works! Thanks for the tip :)

  10. Eddy says:

    Muy bueno el metodo y ademas muy facil de emplear. Eddy

  11. Hello my friend,i like your blog very much ^^ i hope you will add facebook website badge on your blog Regards ADI

  12. Burr Grinder says:

    Thanks for posting this great tutorial

  13. open standards make it so easy to create new stuff
    Lawrence Williams
    http://www.trybw.com
    Fort Myers, Naples, Computer Service Repair

  14. Rozella says:

    What i don’t understood is in truth how you’re now nott actually a
    lott more smartly-appreciated than you may be right now.
    You are very intelligent. You recognize therefore
    significantly relating to this matter, produced me personally imagine it from so many
    numerous angles. Its like women and men aren’t
    fasccinated until it is something to do with Woman gaga!
    Your inddividual stuffs great. All the time deal with it up!

  15. I’m gone to sayy to my little brother, that he should also pay a quicck visit this blog on regular basis to get updated
    from newest gossip.

  16. I am betting that you didn’t progress past 5th grade. My
    hamster blogs superior than you!

  17. Hey! Would you mind if I share your blog with my facebook group?
    There’s a lot of folks that I think would really appreciate your content.
    Please let me know. Thank you

  18. Right here is the perfect website for anyone who really wants to understand this topic.

    You understand a whole lot its almost tough to argue with you (not that I actually will
    need to…HaHa). You certainly put a brand new spin on a topic that has been written about for a long time.
    Great stuff, just wonderful!

    Feel free to surf to my website – http://www.meltingpottours.Com

  19. Youtu.Be says:

    My brother recommended I would possibly like this blog.

    He used to be entirely right. This publish truly made my day.
    You cann’t believe just how so much time I
    had spent for this information! Thank you!

    My blog: Youtu.Be

  20. Jann says:

    Hi there this is somewhat of off topic but I was wanting to know if blogs use WYSIWYG editors or if
    you have to manually code with HTML. I’m starting a blog soon but have no coding knowledge so I wanted to get guidance from someone with experience.
    Any help would be enormously appreciated!

  21. Hey there! This is my 1st comment here so I just wanted to give
    a quick shout out and tell you I really enjoy reading
    through your blog posts. Can you suggest any other
    blogs/websites/forums that deal with the same subjects?
    Thanks!

  22. Hung says:

    Hi every one, here every person is sharing such knowledge, thus it’s
    pleasant to read this web site, and I used to go to see this website every day.

  23. Terese says:

    My partner and I absolutely love your blog and find
    a lot of your post’s to be what precisely I’m looking for.

    can you offer guest writers to write content for you personally?
    I wouldn’t mind creating a post or elaborating on a few
    of the subjects you write related to here.

    Again, awesome weblog!

  24. Tremendous things here. I’m very satisfied to see your article.

    Thank you a lot and I’m having a look forward to touch
    you. Will you kindly drop me a mail?

  25. Hi there, You have done an excellent job. I will definitely digg it and personally recommend to my
    friends. I’m confident they’ll be benefited from this
    web site.

  26. Fantastic goods from you, man. I’ve understand your stuff previous to and you’re just extremely wonderful.
    I really like what you’ve acquired here, certainly like
    what you are stating and the way in which you say it.
    You make it enjoyable and you still care for to keep it wise.
    I can not wait to read much more from you. This is really a great web site.

  27. Julian says:

    Great post.

    My blog post ffree wizard101 membership code (Julian)

  28. In the present scenario animation has a huge demand in national as well
    as in international market. Didn’t the world seem a lot better during Saturday morning cartoons.
    Astro Boy was groundbreaking, as the style of animation used epitomized what would later became known throughout the
    world as “anime.

  29. After I originally commented I seem to have clicked on the -Notify me when new comments are added- checkbox and from now on whenever a comment
    is added I recieve 4 emails with the exact same comment.

    Perhaps there is a way you are able to remove me from
    that service? Cheers!

  30. web page says:

    Quality articles or reviews is the crucial to attract the visitors to pay a quick
    visit the website, that’s what this web page
    is providing.

  31. Hi, its good post on the topic of media print, we all
    be familiar with media is a enormous source
    of facts.

  32. pornstar says:

    I fοr all time emailed his weblog post ρage to aall my associates, Ƅecause
    if like to read iit next my friends ѡill tοo.

  33. I am really grateful to the owner of this web page who has shared this wonderful post at at this place.

  34. Thanks for any other great post. The place else may just anyone get that
    kind of info in such an ideal means of writing? I have a presentation subsequent
    week, and I am at the look for such information.

  35. motto mclean says:

    I visit day-to-day some websites and sites to read posts, but
    this weblog offers feature based posts.

  36. This is my first time visit at here and i am actually impressed to read everthing at alone
    place.

  37. People adore feeling such as a brand is private, and milestones increase that feel.

  38. Thanks for finally writing about > SIOC implementation for BlogEngine.NET | John Dyer’s Code < Liked it!

  39. anal says:

    Hi there, You’ve done a fantastic job. I will certainly digg
    it and personally suggest to my friends. I’m confident they’ll be benefited from this
    website.

  40. tvs UK says:

    This paragraph will help the internet visitors for building
    up new website or even a weblog from start to end.

  41. Fantastic site you have here but I was wanting
    to know if you knew of any message boards that cover the same topics talked about
    here? I’d really love to be a part of group where
    I can get opinions from other experienced individuals that share the same interest.
    If you have any recommendations, please let me know. Thank you!

  42. bipod says:

    Consejo: Si ciertos tratamientos para saber como se quita la caspa soluciona su inconveniente, recuerde mantener todos y cada uno de los utensilios de cabello limpios para prevenir siguientes apariciones
    de caspa.

  43. I’m not sure exactly why but this blog is loading very slow
    for me. Is anyonhe else having this issue or is it a issue on my end?
    I’ll check back later and see if the problem still exists.

    Look at my blog best blenders (dropmybloodfordrachmas.tumblr.com)

  44. I am not certain the place you’re getting your info, but good topic.
    I needs to spend a while learning much more or working out more.
    Thank you for fantastic info I was looking for this information for my
    mission.

  45. Direct Mail says:

    Any less will make it easy for multination companies to connect with
    to your target market. They will then take that information and posters printing format it into the newsletter; this
    will be bad for their business in-order to arrive
    quality result of images, text and designs. This includes
    the captions, headlines, and actual copy. DistributionConsider
    the method you prefer. These will be posters printing for
    the body. Today, you can do it with your printer.

  46. Todas y cada una de las marcas que ofrecemos de pienso para perros económico ofrecen fórmulas distintas para la edad y el tamaño de tu mascota.

  47. I am regular visitor, how are you everybody?
    This article posted at this web site is truly pleasant.

  48. When some one searches for his vital thing, so he/she
    desires to be available that in detail, thus that thing is maintained over here.

  49. Lioa says:

    I think that They will then take that information and posters printing format it into the newsletter. And I can get opinions from other experienced individuals that share the same interest.

  50. I am really happy to glance at this weblog posts which includes plenty of valuable data, thanks for providing such data.

  51. mesin kasir says:

    I used to be recommended this blog by my cousin. I am no longer certain whether this submit is written through him as no
    one else understand such specific about my difficulty. You are wonderful!
    Thanks!

  52. adwords says:

    Excellent goods from you, man. I have take into account
    your stuff previous to and you’re simply extremely magnificent.

    I actually like what you have bought right here, really like what you’re
    stating and the best way in which you are saying it.
    You’re making it enjoyable and you continue to care for to
    stay it sensible. I cant wait to read far more from you. That is really a tremendous site.

  53. gta 5 hack says:

    One of my favorite free games online to play is called Bloons.
    The particular cell phone you use will identify if it is compatible together with your preferred
    software program. We are clearly not saying that downloading games will be
    the absolute future of ALL video games purchases, but it
    will notably take a sizable share of retail sales from here on out.

  54. I’ve been exploring for a bit for any high-quality articles or weblog
    posts on this kind of area . Exploring in Yahoo I at last stumbled upon this site.
    Studying this info So i’m happy to express that I have a very just
    right uncanny feeling I came upon exactly what I needed.
    I such a lot without a doubt will make certain to don?t forget this site and provides
    it a glance on a relentless basis.

  55. You can certainly see your skills within the article you write.

    The sector hopes for more passionate writers like you who aren’t afraid to mention how
    they believe. At all times follow your heart.

Leave a Reply

Hi, I'm John Dyer. In my day job, I build websites and create online seminary software for a seminary in Dallas. I also like to release open source tools including a pretty popular HTML5 video player and build tools that help people find best bible commentaries and do bible study. And just for fun, I also wrote a book on the theology of technology and media.

Fork me on GitHub

Social Widgets powered by AB-WebLog.com.