Disqus For Comments

As I've noted before I'm using disqus for my comments. Disqus is an external comment system, it can be embedded just about anywhere.

There are some nice points and some negatives right now.

As an external service disqus is completely separate from my blog. I don't need any local auth system, I don't need to store stuff in a local database, and I don't need a server-side language. ;) In other words, it works beautifully on sites built out of compiled static html. And you can even include it into random web pages.

The biggest issue right now is more technical. Other than the fact that some post urls and thread messages are screwed up because disqus doesn't have a way for me to update the bad values initially given the universal js code is atrocious.

The universal js code disqus uses makes use of document.write so as a result you can only include the scripts in the place where the output will go, and the scripts are dynamically generated so we get no benefit of making the css and js that are common within the scripts external and cached efficiently (oh ya, right, that document.write usually includes an embedded style tag that gets outputted next to the markup (btw, this is invalid in XHTML served with the proper mimetype, so people who are still trying to cling to the old XHTML hype might not be so well supported (then again, no-one really uses XHTML properly anyways, so I guess that won't matter to them anyways))).

Now in addition to the really ugly javascript that makes it look like discus' developers learned javascript from w3schools and never actually learned the language (ie: like the thousands of script kiddies out there) the api is fairly limited. The same simple things that the widget scripts output (ie: listing recent comments) require either a user api key or a forum api key (depending on the api action) so as a result it is impossible to simply replace these user scripts with client side ajax because that would both require you to make private API keys publicly available, and because discus' API does not support JSONP or Cross-site XHR. Thus you can only do this with a custom server-side script.

The other issue there is with discus' API documentation as well. It's not that great... They explain the different api types, and the keys, but they don't give enough explanation. It took me awhile to understand that thread_id is a numeric thread_id I need to query for in the api, not the thread identifier which I defined for threads. Getting forum posts notes two parameters that take entry types to exclude or filter to but they don't list the possible values, the example only lets you know of two possible values. And finally the return data is not explained. Complex data such as what data is contained in a comment entry and the many possible variations that should be formatted differently has little to no documentation at all.

So in summary, discus is a great and has great potential, but some of it's technical stuff like the Universal JS, API, Documentation, and various features which are missing (like multiple e-mails, claiming anon comments, better comment importing, updating bad thread urls and messages, and so on...) need to mature.

Tags:
  • blog
PreviousNext