[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Approach to atompub implementation for a forum




Brian Smith wrote:
Clearly, each article should be represented as an atom entry. If you have threaded conversations, then each article will have a reference to the article it is replying to (using the atom threading extension), except for the first article in each topic. If you don't have threaded conversations, then they can be considered a reply to the first article in the topic.
I like it so far... I don't have threaded replies so I didn't look into threading extensions. But now I think I can do like this:

Service document:
 - Forum1 (Collection)
 - Forum2 (Collection)

Forum
|
+-- article Entry with a title (a start of a topic)
|   |
|   +-- article Entry without a title (a reply to a topic)
|   |
|   +-- article Entry ...
|
+-- article Entry with a title (another topic)

AtomPub collections: In order to start a new topic using this design, each forum needs its own AtomPub collection to post to. These would be listed in the service document.

To reply to an topic or article, there needs to be some kind of link from each topic or article to an AtomPub collection, so that the client knows what collection to post the reply to.
If I have forums as collections then both replies to existing topics and new topics would be POSTs to the same collections. The only difference would be that:

- topics require title and cannot have "hr:in-reply-to"
- replies can't have title but have to have "hr:in-reply-to"

Seems sane?
These approaches are not mutually exclusive. A topic can be a collection, an entry, and a feed at the same time.
My point is to make it automatically discoverable. I thought there's an established way to say: "this forum entry is a topic with some title, but it's URI works also as a collection for posts". But from your email that there's no established semantics of this kind
An alternative would be to give each user a single "subscribe" collection and a "subscribed" feed. The user can post an entry to the collection that looks like this:

   <entry>
       ...
       <link rel='alternate' href='{IRI of the topic}'/>
       ...
   </entry>
Ah, neat! I'll think about such bookmarking :-)