Microformats + DOM / AJAX = Mashup Nirvana

Kevin Lawver

This is a presentation. If you'd like to view all the slides like a normal web page, you can.

Who is Kevin Lawver?

Agenda

What are Microformats?

Microformats are a set of simple, open data formats built upon existing and widely adopted standards.

No, Really...

Sounds Hard...

<address>
    Westin Boston Waterfront<br />
    425 Summer Street<br />  
    Boston, MA  02210<br />
    <a href="http://maps.google.com/maps?q=425+Summer+Street,+Boston,+MA+02210&hl=en" target="_map">View Map</a>
</address>

That Same Code With Microformats!

<address class="vcard">
    <p class="org">Westin Boston Waterfront</p>
    <p class="street-address">425 Summer Street</p>
    <p><b class="locality">Boston</b>, <b class="region">MA</b>  <b class="postal-code">02210</b></p>
    <a href="http://maps.google.com/maps?q=425+Summer+Street,+Boston,+MA+02210&hl=en" target="_map">View Map</a>
</address>

That Wasn't So Hard, Was It?

Paving the Cowpath

Reuse, Reuse, Reuse!

Current Microformats

XFN, rel-license and rel-tag

XOXO

XOXO Example

<ul class="xoxo">
    <li>An item
        <ul>
            <li>A sub-item</li>
        </ul>
    </li>
    <li>Another item</li>
</ul>

hCalendar

hCal Example

<ul><li class="vevent">
    <h4 class="summary">
        <a class="url" href="http://theajaxexperience.com/" target="_new">The AJAX Experience</a>
    </h4>
    <div class="description">I'll be speaking about microformats, and their uses
        in DOM scripting, web services and AJAX-y goodness
    </div>
    <p class="location">Boston, MA</p>
    <p>
        <abbr class="dtstart" title="2006-10-23">10/23/2006</abbr> - 
        <abbr class="dtend" title="2006-10-25">10/25/2006</abbr>
    </p>
</li></ul>

hCard

hCard Example

<div class="vcard">
    <a class="url fn" href="http://lawver.net/">Kevin Lawver</a> - 
    <a href="http://aol.com" class="org">AOL</a>
</div>

hAtom

hAtom Example

<div class="hentry">
   <h3 class="entry-title">
       <a href="http://someurl.com/blog/permalink" class="bookmark">My Blog Post</a>
    </h3>
   <div class="entry-content">I'm going to AJAX Experience!</div>
   <p>
       Published <abbr title="2006-10-24T09:30:30">10/24/2006</abbr> 
       by <b class="author">Kevin Lawver</b>.
   </p>
</div>

hReview

hReview Example

<div class="hreview">
 <span class="reviewer vcard">
  <span class="fn">anonymous</span>, 
  <abbr class="dtreviewed" title="20050418">April 18th, 2005</abbr>
 </span>
 <div class="item">
  <a lang="zh" class="url fn" href="http://www.imdb.com/title/tt0299977/">
  Ying Xiong (<span lang="en">HERO</span>)
  </a>
 </div>
 <div>Rating: <span class="rating">4</span> out of 5</div>
 <div class="description"><p>
  This movie has great music and visuals.
 </p></div>
</div>

hResume

hResume Example

Development Example: ModuleT

Document Existing Formats

Draft, Publish, Revise, Repeat

ModuleT in Action

Generating Microformats

Parsing Microformats

Discoverability

Shared Events

How Sharing Works

Possibilities

Your Document Becomes the API

What if...

Transformation

Transform it!!

Other Tools for Transformation

Mashups and Microformats

Beginnings of the Revolution

Some Browser Examples

Other Microformat Web Services and Extensions

Things That Would Make Me Happy

The Future is Bright

Return on Investment

Questions?