Microformats for Web Services and Portable Content
Kevin Lawver
This is a presentation. If you'd like to view all the slides like a normal web page,
you can
.
What are Microformats?
A set of
HTML
attribute values that add meaning to otherwise generic content.
An implementation of
existing
web standards,
not
new standards
Where are They Used Today?
By companies like:
AOL
Yahoo
Technorati
LinkedIn
Ma.gnolia
and others
Eventful
Edgeio
Many more!
By individual developers and bloggers all over the world
See all the implementations
Existing Web Services
Technorati
hcard to vcf service
hcal to ical service
AIM
Pages
Service to pull individual modulet modules from
AIM
Pages
Example
See the
implementations page
for more
Existing Parsers
Ruby:
mofo
PHP
:
hKit
Javascript:
Sumo
Python:
Python Microformat Parser
Use Case: Widgets
AIM
Pages
provides a web service around modules
Any page on
AIM
Page
is
a web service.
Example
Demo: Incestuous Widgets
My Page
has a list of conferences I'm attending.
Me Evil Twin's Page
has one too!
If I sign in as me and to go my evil twin's page, it shows the events we're both going to!
Incestuous Widgets: How It Works
Grabs the visitor's my-events module if it's there.
Looks for
URL
s that are in the current page's my-events module.
Builds and then displays list of shared events.
the code
Use Case: Mashups and Portable Content
When your page is the
API,
people don't need fancy
REST
or
SOAP API
s.
You only have to build it once, and then see how people use it.
Demo: Mashups and Portable Content
Ficlets
has lots of different feeds
But, it's missing feeds for prequels and sequels.
Les Orchard created his own prequel/sequel feed from our microformatted content
Use Case: OpenID
OpenID
provides distributed identity - all based on
URL
s.
What if those
URL
s contained
hcards
?
Profile Demo
Built on Ruby on Rails
Uses OpenID for authentication
When it returns, it grabs the identity
URL
and looks for HCards using
mofo
Populates your profile with the data if it finds an hcard.
Download it (coming soon)
Use Case: Feeds Without Feeds
What if you didn't need a feed? What if your content was so well described on the page you could use
that
as the feed?
Demo:
AIM
Pages (if the network works)
I build a "cheap"
blog module for
AIM
Pages
I wanted a feed, but didn't want to have to figure out how to write out another file to the user's directory.
Microformats to the rescue!
Demo:
AIM
Pages: Building the Feed
Using
PHP,
I grabbed that module of the page
Parsed out the hatom feed using
DOM
methods
Return it as
ATOM
Demo: Rails + hpricot (if the network doesn't work)
Using
Rails
and
hpricot
, I built an hatom to
ATOM
conversion.
Demo
Conclusion
Produce content once, then repurpose
Don't want
XHTML
anymore? Transform it!
Use data from everywhere without dealing with
API
s
Get the "semantic web"
today
.
Q&A