Skip to content

Dissecting Eventbrite: rel=”alternate” type=”text/calendar”

I like Eventbrite. They do the RSVP/ticket selling thing well.

One of things I hope to support is parsing event details out of properly structured web pages, and such a feature might as well not exist if it doesn’t work with Eventbrite.

So, doing a view-source on an Eventbrite page and picking through the angle-brackets is a worthwhile use of time. Here’s one cool thing I found:

There are several ways to embed computer-readable event data in a web page. Most of the energy lately has been around hCalendar, a microformat. With hCalendar, you use certain class names and structure to signify how particular parts map to iCalendar. Here’s an example:

<div class="vevent"><a class="url" href="http://conferences.oreillynet.com/pub/w/40/program.html">
http://conferences.oreillynet.com/pub/w/40/program.html
</a>
<span class="summary">Web 2.0 Conference</span>:
<abbr class="dtstart" title="2005-10-05">October 5</abbr>-
<abbr class="dtend" title="2005-10-07">7</abbr>,
at the <span class="location">Argent Hotel, San Francisco, CA</span></div>

Eventbrite doesn’t do that. Instead, they simply link to an iCal representation:

<link rel="alternate" type="text/calendar" title="iCalendar" href="http://www.eventbrite.com/calendar?eid=537543808&calendar=ical" />

What “rel=alternate” and “type=text/calendar” say to a piece of software is “This URL is an alternative representation of the page you are looking at, and it’s MIME type is “text/calendar” (which means iCal). Sure enough, if you follow that URL you get:

BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
URL:http://dcweek.eventbrite.com
DTSTART:20100611T120000Z
DTEND:20100621T035500Z
SUMMARY:Digital Capital Week
DESCRIPTION:For details, click here: http://dcweek.eventbrite.com
LOCATION:Washington DC and Beyond - 1600 Pennsylvania Ave NW - Washington, DC 20500 - 
END:VEVENT
END:VCALENDAR

Cool, right? I’m not prepared to argue that this is technically superior to hCal, only to say that I like it.

3 Comments

  1. Wouldn’t it be better to use both the hCalendar microformat and “rel=alternate” and “type=text/calendar”, so depending on how people want to set up or have already built their web applications could pull the data either way. They might even want to set up an RSS feed for those that like that format.

    Thanks, for pointing these things out so I will add them to my web based event registration application I’m in the beginning stages of building can use these as well.

    Sunday, May 2, 2010 at 9:57 am | Permalink
  2. Ross Karchner wrote:

    There’s definitely no reason not to do both, although I’ve been meaning to get your thoughts on the accessibility issues in hCal,

    Read here: http://microformats.org/wiki/abbr-design-pattern#Accessibility_issues

    Basically, stuffing ISO dates in abbr tags isn’t very friendly to screen readers.

    Sunday, May 2, 2010 at 11:22 am | Permalink
  3. Think I would use the alternate versions to the ABBR one. If that is what they are suggesting to use it would probably be the best. I know a lot of people have been thinking of ways to fix that issue and I’m not one of them.

    Sunday, May 23, 2010 at 12:29 am | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*