A simple alternative to ActivityStreams for representing updates to a site inspired by wiki style RecentChanges.
- Every resource (URL) SHOULD have a RecentChanges endpoint.
GET /some-resource HTTP/1.1
Host: sandeep.shetty.in
HTTP/1.1 200 OK
Link: <http://sandeep.shetty.in/recentchanges-endpoint?res=/some-resource>; rel="http://example.com/TDB"
<html>
...
<link href="http://sandeep.shetty.in/recentchanges-endpoint?res=/some-resource" rel="http://example.com/TDB" />
...
- The RecentChanges endpoint at each level of the (URL) hierarchy SHOULD aggregate all RecentChanges under it.
- The RecentChanges endpoint of the site MUST aggregates site-wide RecentChanges.
GET / HTTP/1.1
Host: sandeep.shetty.in
HTTP/1.1 200 OK
Link: <http://sandeep.shetty.in/recentchanges-endpoint>; rel="http://example.com/TDB"
<html>
...
<link href="http://sandeep.shetty.in/recentchanges-endpoint" rel="http://example.com/TDB" />
...
- The RecentChanges endpoint could return HTML (marked up with microformats) or JSON.
- RecentChanges only requires/uses 4 verbs: Post, Update, Respond, Delete (PURD). (open to renaming these but the key idea is that we only need a limited number of verbs: 4 based on use cases below)
- Use-cases:
- New Post:
Sandeep Shetty posted Foobar
- Edit an existing post:
[Sandeep Shetty](http://sandeep.shetty.in/) updated [Foobar](http://example.com/foobar) with http://example.com/diff/v1-vs-v2
- Comment on a post:
Barnaby Walters responded to Foobar with "Hello world! ..."
- Response to a specific comment:
Barnaby Walters responded to "Hello world! ..." with "Hello world again! ..."
likes
are just a canned response that could be represented by something like emoji:Sandeep Shetty responded to "Hello world again! ..." with ":like:"
- Delete post:
Sandeep Shetty deleted Foobar
- Instead of a separate RecentChanges endpoint, it could just be microformats on the same page.
- microformats for marking up RecentChanges.
- JSON format for RecentChanges (could just go with the microformats and skip this - DRY)
- Mandatory link to xkcd: http://xkcd.com/927/
- Original post: http://sandeep.shetty.in/2013/05/recentchanges-alternative-to.html
- http://c2.com/cgi/wiki?RecentChanges
- http://c2.com/cgi/wiki?RecentChangesDiscussion