annando / salmon-protocol

Automatically exported from code.google.com/p/salmon-protocol
0 stars 0 forks source link

Why have salmon specific link relationships for comment posting? #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I took a look at the spec and wondered if you had considered building this
atop The Atom Threading Extension, the Atom Publishing Protocol and Magic
Signatures

For example.

Suppose that I had an entry that has some comments.  I can represent this
using the 'replies' link relationship as follows.

   <feed xmlns="http://www.w3.org/2005/Atom"
         xmlns:thr="http://purl.org/syndication/thread/1.0">
     <id>http://www.example.org/myfeed</id>
     <title>My Example Feed</title>
     <updated>2005-07-28T12:00:00Z</updated>
     <link href="http://www.example.org/myfeed" />
     <author><name>James</name></author>
     <entry>
       <id>tag:entries.com,2005:1</id>
       <title>My original entry</title>
       <updated>2006-03-01T12:12:12Z</updated>
       <link href="http://www.example.org/entries/1" />
       <link rel="replies"
             type="application/atom+xml"
             href="http://www.example.org/commentsforentry1.xml"
             thr:count="10" thr:updated="2005-07-28T12:10:00Z" />
       <summary>This is my original entry</summary>
     </entry>
   </feed>

The href "http://www.example.org/commentsforentry1.xml" produces a feed
that contains the comments for this entry.  The feed can also contain an
<app:collection> header in it pointing at the app collection that can be
used to update the comment feed e.g.

   <feed xmlns="http://www.w3.org/2005/Atom"
         xmlns:app="http://www.w3.org/2007/app">
     <id>http://www.example.org/commentsforentry1.xml</id>
     <title>Comments for Entry 1</title>
     <updated>2005-07-28T12:00:00Z</updated>
     <link href="http://www.example.org/commentsforentry1.xml"/>
     <author><name>James</name></author>
     <app:collection
           href="http://www.example.org/appcommentsforentry1.xml" >
         <accept>application/atom+xml;type=salmon-comments</accept>
     </collection>
     <entry>
       <id>tag:example.org,2005:1,1</id>
       <title>A response to the original</title>
       <updated>2006-03-01T12:12:12Z</updated>
       <link href="http://www.example.org/entries/1/1" />
     </entry>
   </feed>

Atom Publishing Protocol semantics can now we used from here i.e. new
comments can be added to the feed by posting an entry to the url
"http://www.example.org/appcommentsforentry1.xml".  In addition Atom
publishing semantics would also be used for deletions and modifications vs.
the semantics described in Section 8.

Would be interested in your thoughts,

Rob

p.s. Not sure whether this should be logged as an issue or just mailed to
the mailing list.  Putting it here as this is where most of the discussion
seems to be happening, but please advise.

Original issue reported on code.google.com by robertya...@gmail.com on 28 Feb 2010 at 4:07

GoogleCodeExporter commented 9 years ago
It's quite possible that the app:collection endpoint and the "salmon" endpoint 
are in fact the same endpoint in 
many implementations.  But we want a specific link advertised for Salmon to 
indicate Salmon-capability -- 
app:collection doesn't give us that.

Why discovery of capability is important:  You don't want to show UX asking the 
user if it's okay to send a 
salmon upstream if there's no possibility it'll be accepted (and you don't want 
to send salmon up a dry 
creekbed for performance reasons anyway).

Original comment by jpanzer@google.com on 6 Apr 2010 at 10:51