[uf-rest] New microformat/REST Ruby Parser: mofo

Dr. Ernie Prabhakar drernie at opendarwin.org
Tue Mar 13 11:43:03 PST 2007


Hi all,

Things have been fairly quiet lately (despite many new members who've  
joined, welcome).  I've been pondering how best to build on the  
success of getting REST into Rails 1.2.  Fortunately, Chris (cc-ed  
above) appears to have beaten me to it:

http://errtheblog.com/post/37

> What if instead of requesting /posts/1 and posts/1.xml, all you  
> ever needed was /posts/1? I’m not making this up. We are indeed  
> seeing the epoch of a world of resources, and in many places we can  
> take the RESTful design a step further: we can eliminate some of  
> our our respond_to and params[:format] requirements. Less code...

> Soon you may not even need to code feeds—either your readers will  
> understand hAtom and be capable of subscribing to a URL directly  
> (which NetNewsWire can already do), or you can (now) use an hAtom  
> to Atom converter. Just point Feedburner at the converted feed and  
> bam, insta-Atom. No extra code required.
>
> And that’s the whole point. Less code. The information is already  
> there. Help the machines find it.
What's more intriguing is that he's using Hpricot, the whiz-bang  
(well, whiz-% :-) Ruby parser, for the (somewhat painfully named) mofo:

> mofo is a microformat parser for Ruby based on Hpricot. It’s got a  
> nice little DSL for defining microformats and currently supports  
> hCard, hCalendar, hReview, hEntry, xoxo, rel-tag, and rel-bookmark.  
> There may be a few kinks, but hey, it’s new.
Me thinks it wouldn't be that difficult to hack scaffold_resource to  
generate XOXO-compatible lists that could be extracted into the  
equivalent of "to_xml", and then to add that into ActiveResource to  
create an end-to-end REST-Enabled XHTML solution.

In fact, that seems to be what Drew McClellan (on this list?)  
suggested, which at least partly inspired Chris:

http://allinthehead.com/presentations/2006/mf-website-api.pdf



Did that make sense (and/or sound cool) to anyone besides me?

-- Ernie P.


More information about the microformats-rest mailing list