Wednesday, July 8, 2009

So easy

I started the day with the task of deciding how I would go about integrating a ratings system and commenting into a service that I'm building the prototype for.

I've already been enjoying how easy it has been to get functionality up and running using a port of Django for Google App Engine called App Engine Patch, and also enjoying in general getting more comfortable with the Python programming language.

Anyway I decided first that I would look into integrating a third-party commenting system to address that piece, and thought I'd pick Disqus, which I've seen on various blogs and like (for reasons of threading and such).

After copying and pasting a total of about 17 lines of javascript into the appropriate template for my Django app, that was done.

I then spent some time putting together an implementation of ratings natively in the Django app. Then I went looking for a javascript UI piece, and in the process came across a ratings system that is part of something called JS-Kit.

A little bit of testing later, and removing the start of my ratings implementation, and 7 additional lines of code into the same Django template that took the commenting code, and I had ratings as well.

So, at the end of the day I had learned a lot, but also got ratings and commenting into the application at the cost of 24 lines of javascript.

Eventually I may rip these out in favor of native implementations, for various reasons. But for now - thanks to Disqus and JS-Kit for getting these out of the way!

No comments:

Post a Comment