[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: URI constraints (was: Idioms)
On Sun, Oct 10, 2004 at 08:59:10PM -0400, Joe Gregorio wrote:
>
> Blogger can publish to sites outside of blogger.com. I.e. if the
> PostURI is at www.blogger.com/atom/ then posting an entry to it
> will create resources outside that domain.
I'm not sure that I see the problem with this. For starters, Robert's
suggestion was to use POST to create new resources on the server (I'd
invent a new method, but that's another thread). Since POST has no
inherent semantics, we can construct any that we'd like. Thus, a POST can
put an entry anywhere in the URI hierarchy it would like.
Next, we can look at modification (PUT), retrieval (GET), deletion
(DELETE), and fetching the list of posts/users/templates/etc (PROPFIND).
The first three are pretty easy: if you have a URL for an entry resource,
then you can manipulate it. The last (PROPFIND) is how you find those
URLs. And that is the part which *does* assume hierarchy. You PROPFIND
from the collection holds all of the objects.
Now consider the blogspot blog case. The blog's HTML representation and
feed lives over on blogspot. The atom-capable resources(*) live over on
blogger.com.
In "my world" :-), I'd try and use WebDAV as much as possible. A client
would PROPFIND against one of the blog pages or the feed. One of the
properites would say the "posting resource" is at <this> URL, which would
be a URL pointing to blogger.com. It might be something of the form:
https://www.blogger.com/atom-1.0/blogs/12345678/
POST'ing to that resource would create a new blog post. Running PROPFIND
on it would return "all" the posts (non-scalable, so I need to think a bit
on that one). The PROPFIND results contain URLs for the posts within that
collection (where the collection represents the blog). A DELETE of one of
those resources exactly models the desired operation: delete <that> post.
A side effect that the Blogger server would have is a corresponding
deletion of the post on blogspot.com. A PUT to the resource has a similar
result to blogger.com and blogspot.com. Performing a GET on this resource
would return the "raw" post, rather than the templated HTML post that you
see on blogspt.com.
I believe that answers the question at hand, though the Q is a bit fuzzy.
Specifically, we *can* model sets of items (users, templates, posts, etc)
using WebDAV collections.
There is an open question for what to do with the blog that has 100,000
posts in it. That would be a scary-huge PROPFIND result (legal, if a bit
expensive; could be about a 20 meg response).
Cheers,
-g
(*) I say (plural) "resources" because I disagree with the notion of a
single endpoint. Various resources are exposed by a server for
manipulation by an atom-enabled client. To some extent, you could say
there are "multiple endpoints", but it is a bit silly to invent new
nomenclature. They are resources, and you use HTTP methods on them.