Re: Proposal for work on an efficient, browser-friendly, HTTP-based communication protocol for fine-grained information exchange

Hi Michael,

Thanks a lot for your question.

On Thu, Aug 26, 2010 at 10:52 AM, Michael Wechner
<michael.wechner@wyona.com> wrote:
> can you give a "real-world" example such that I can understand better :-) ?
> And also where the existing "protocols" are lacking?

I am more than happy to give you a couple of real-life use cases that
may give you a little bit of insight on what i have in mind.

Let's assume as a starting point that I have a standard HTML form in a
browser that I want a user to enter information. While it doesn't
really matter what the application is, to make it really tangible
let's say it is a form that I want to let a user update their profile
information, such as their first name, last name and birthdate.

If we assume that this is fine-grained information that is persisted
on the server, one would assume that the user profile could be
considered a resource (in the WebDAV sense) and the fine-grained
information (first name, last name and birthdate) would lend itself to
be properties on that resource (in the webdav sense).

Assuming that I wanted to transport this information to a WebDAV
server using WebDAV as the communication protocol between my browser
and my WebDAV server I would find myself in a situation where I would
have to write a very healthy chunk of javascript code working with XHR
to come up with the PROPPATCH method and the respective XML for the
body of the request to be able to persist my information to WebDAV
server.
If we extend the use case to a user uploading their profile picture,
then the the task to interact with my WebDAV server goes from
"difficult" to "impossible" using my standard browser.

The goal of this effort is to define an interaction pattern that
allows a standard browser to interact with the server in a
fine-grained and efficient manner, yet honoring a lot of the semantics
and model that have been established around WebDAV.

So the above example, in my mind could result in a very simple form
that could look like this. In straight up (somewhat simplified) html
...

---
<form method="POST" action="/profiles/david">
	<input name="firstname" />
	<input name="lastname" />
	<input name="birthdate" />
	<input name="picture" type="file" />
	<input type="submit" />
</form>
---

...and would not require the hundreds of lines of code javascript and
a very cooperative browser to allow me to update my profile.

Further more if we assume that if the client-sided javascript
application becomes more complex and would like to interact with the
fine-grained information from a JavaScript/XHR standpoint there would
be the ability to easily access with a GET the above information as
something like:

---
{
firstname: "David",
lastname: "Nuescheler",
birthdate: "Oct 31 1974"
}
---

... or update the above with something along the lines of a PATCH or a
POST with a body similar to...

---
-birthdate
^lastModifiedBy : "me"
---

... which would remove the birthdate property and update the
lastModifiedBy, directly from a Javascript application.


As suggested in the thread before, I agree that the conversations
around the model that we are operating on and the respective bindings
to specific formats need to be separate conversations, but I think to
make it more tangible and real-life as you requested I thought that it
may make sense to wrap it into the example.

Please let me know if that addresses your question or if it is
something else that you were looking for.

regards,
david

On Thu, Aug 26, 2010 at 10:52 AM, Michael Wechner
<michael.wechner@wyona.com> wrote:
> David Nuescheler wrote:
>>
>> Hi All,
>>
>> Julian and I (and occasionally many others) have been discussing a
>> development effort like this for quite while.
>> I was involved in mapping the scope of WebDAV (and friends) into a
>> Java API called JCR[1][2][3] (on which for example Geoff, Julian and
>> Roy participated) and due to my Day[4] job (pun intended) I find
>> myself very often in a situation where I need have a standard
>> web-browser or client-sided web-application interact with a server to
>> exchange fine-grained information.
>>
>
> can you give a "real-world" example such that I can understand better :-) ?
>
> And also where the existing "protocols" are lacking?
>
> Thanks
>
> Michael
>>
>> Thanks a lot to everybody for all the comments and input.
>>
>> I guess my main take from this is that I completely agree that we need
>> to separate the "model"-conversation from the
>> "format/binding"-conversation.
>>
>> I would like to mention though that in my mind the goal of making this
>> effort relevant, efficient and simple is extremely important as well.
>> While I appreciate that the separation of the discussions, I would
>> like to volunteer to work on bindings to a JSON + PATCH (multipart
>> POST) very early on in the process and keep it in sync with the model
>> as a living set of examples for the interaction with the more abstract
>> model, to ensure that we keep things practical.
>>
>> I think there are of a large number of very similar, JSON/POST-based
>> "protocols" that are defined in an ad-hoc manner by developers. So
>> there should be quite a bit of experience out there, that can help us
>> gauge the importance some of requirements fairly quickly. I think if
>> we manage to take the combined the experience from WebDAV, AtomPub and
>> JCR (and possibly more domain specific efforts like CMIS) in terms of
>> the overall scope and the initial relevance of certain features we
>> should be in great shape.
>>
>> regards,
>> david
>>
>> [1] http://jcp.org/en/jsr/detail?id=170
>> [2] http://jcp.org/en/jsr/detail?id=283
>> [3] http://jcp.org/en/jsr/detail?id=333
>> [4] http://www.day.com
>>
>>
>
>



-- 
David Nuescheler
Chief Technology Officer
mailto: david.nuescheler@day.com

web:  http://www.day.com/ http://dev.day.com
twitter: @davidnuescheler

Received on Friday, 27 August 2010 19:38:57 UTC