[uf-rest] Microformats for <form> ?

Ryan King ryan at technorati.com
Mon Mar 20 12:20:10 PST 2006


On Mar 20, 2006, at 2:30 AM, sixtus at gmail.com wrote:

> Hello all,
>
> coming back to the question "what actually is a service?" with a  
> RESTified perspective, I had the following line of thinking:
>
> REST (using as a synonym to HTTP/1.1) proclaims that a GET should  
> be an idempotent description of the resource, e.g. the service I  
> may invoke via a POST (assuming a service to be a resource needing  
> a certain input to produce desired output).
>
> For ws-* people that description might be a WSDL, for normal  
> people, this will probably be a <form>.
>
> Enough intro to my question: Anybody using microformats to markup  
> forms? Something along the line "I am a service, this is my <form>  
> expecting the following microformats".
>
> Does that make sense? Feedback welcome!

There's actually a lot of potential here. I remember some of us  
talked about this stuff f2f when Dimitri was in the Bay Area last  
summer, but not a lot has been done on it since.

I think there's a couple potential uses of <form>'s regarding (low) 
rest-ful APIs.

First of all, you can probably reuse microformats vocabulary to  
markup forms. Rough example:

<form class="vcard">
    <fieldset class="n">
      <input class="given-name" />
      <input clas"family-name" />
     </fieldset>
</form>

Something like that.

Also, html forms could be useful for documenting the parameters  
available on rest resources. Mixed with microformats, as above, this  
could be a very useful way to document a rest api. It would cover  
much the same territory as WADL, but in a web-native way which can be  
very useful to developers, as the forms are a functional sandbox.

Just some ideas, I wish I had time to flesh them out more.

-r


More information about the microformats-rest mailing list