Simplifying the commenting system

They are many commenting systems out there for Plone, Zope 3, etc.

But let's take this simple statement : why a content provider like any Zope-based application should deal with comments ? A comment is a simple piece of text, that refers to a page and maybe to another comment. There are no workflow needed in most cases. Maybe an authorization required to add the comment but that's it. And how do you provide a comment on a page that is not generated by your web server, but that is displayed somewhere to your users nevertheless ? (like a static page)

So, looking at how Deliverance works, and because I want to have comments on Sphinx pages, I thaught of a simple way to deal with comments: A WSGI Middleware/Proxy.

The comment application stores comments in a SQL DB and use the pages id (the full URL) as references. I can even use services like Akismet to avoid spams. Then when the page is displayed, I can inject the comments associated to it on-the-fly, and provide a JS-enabled form for people to add comments (which can be caught when submited by the middleware too I guess, or sent through Ajax to a small JSON-enabled service that listens)

This is perfect for an hybrid environment where you have pages generated by various web applications.

Of course there are some caveats, like if the page is gone, or has moved. But dealing with orphan comments should be doable.

We might try that out soon for Afpy.org :)

Comments !