Re: [Powerbox] A RESTful proposal for Web enabling devices

Hi Robin,

Thanks for thinking over the Powerbox proposal. Based on your
feedback, I've clarified some sections of the spec. Below are some of
the things I've clarified.

The "multiple" attribute is used in the same way specified in HTML5:

http://dev.w3.org/html5/spec/forms.html#attr-input-multiple

And so is meant to indicate whether or not a Provider should allow
selection of multiple provided resources. If the provided resource URL
does identify a collection of resources, then a GET request on the
provided resource URL is expected to return content of type
"multipart/mixed", the same format HTML4 specifies for submission of
multiple files.

So in your example scenario, the Customer page would need to include
multiple requisition controls if it wanted to receive resources from
many different Providers.

I haven't specified a way for a Provider to declare what MIME types or
resource types it provides, instead thinking that the user-agent
should not attempt to do any automated negotiation here. The user may
always select any of the installed Providers. I suspect any automated
matching done by the user-agent would not work well. The user-agent
might have stale data about what resource types a given Provider
provides. The resource types specified in the requisition request also
might not exactly match those specified by the Provider, even though
the provided resource is compatible with the requisition. Identifiers
created through decentralized development can take a while to
converge.

I am expecting the "class" attribute to be used to identify
interactive resource types. So your example requisition might be
written as:

<input type='file' accept='application/json' class='org.cryptideas.contacts'/>

The above requisition means the Customer is asking for a resource that
supports the interaction pattern identified by
"org.cryptideas.contacts" and uses JSON for exchanged representations.

To support user selection of specific contact data, you'd use an
interactive Provider. For example, the ChupacaBroadcast Customer
content might specify a requisition like:

<input type="file" accept="text/x-vcard" multiple alt="Groups to
inform about your cryptids sighting">

The user activates this requisition control and selects their contacts
Provider. The user-agent sends a provision request like:

POST /user123/select HTTP/1.1
Host: contacts.example.com
Content-Type: application/x-www-form-urlencoded

accept=text%2Fx-vcard&multiple=&alt=Groups+to+inform+about+your+cryptids+sighting

The contacts Provider responds with:

HTTP/1.1 201 Created
Access-Control-Allow-Origin: *
Location: https://contacts.example.com/user123?s=asdfsadfsadf
Content-Type: text/html

<html>
…

The provided entity is an HTML page that contains a Contact selection
user interface. The user selects "Dahut Circle" and "Unique Horns"
contacts. The Provider remembers that the provided resource URL refers
to these two Contacts.

The Customer page can use the provided resource URL to fetch the
contact information and do as it wishes with it.

--Tyler

On Tue, Feb 23, 2010 at 8:53 AM, Robin Berjon <robin@robineko.com> wrote:
> Hi,
>
> On Feb 19, 2010, at 19:48 , Tyler Close wrote:
>> We hope this proposal can provide a basis for this WG's design work,
>> so we're interested in feedback on the proposal and how it might
>> better meet the needs of this WG.
>
> It's a very interesting place to start from, thanks. I started writing an email with questions, but it became too long and messy so I tried to make it a little bit more readable with some pagination:
>
>  http://dev.w3.org/2009/dap/docs/powerbox-walkthrough.html
>
> I'm curious: have you started prototyping this? If so, is the code around somewhere?
>
> --
> Robin Berjon
>  robineko — hired gun, higher standards
>  http://robineko.com/
>
>
>
>
>



-- 
"Waterken News: Capability security on the Web"
http://waterken.sourceforge.net/recent.html

Received on Tuesday, 23 February 2010 18:54:23 UTC