Tuesday, April 1, 2008


My dear old friend Paul Phillips had a recent blog posting about a cool little image browsing technology put out by a company called PicLens. So, of course I start thinking of ideas of how I can use it in my life.

I quickly remembered that I work for a porn company (ahahah) and we generate a lot of images. The current UI on the site is to list all of the images on a single page and link to each image individually. While this is ok for someone who just wants to download all the images, what a real pain in the ass for browsing. In fact, Kink's customers have complained about it in the forums several times now. Enter PicLens.

As of today, we are now the first and only porn site (that I know of) that has integrated PicLens. The implementation was pretty easy. All you need to do is export a RSS feed of the images and include a little bit of JavaScript in the page. First, I considered using a tool like ROME to generate the RSS. The problem with ROME is that it is too complicated, the code isn't updated and the API generally just sucks. Basically, it is hard to use and doesn't pass the KISS test. Then I considered using Abdera, but it is just as much of a pain in the ass to use. Then I realized that generating RSS is like generating HTML. The Element Construction Set style of code design is not the right way to go about outputting HTML. Instead I should be using the perfect tool... Velocity! (Side note: I had a major hand in creating both of those tools, so yes I am a bit biased).

So, I quickly added a method to my @Stateless FeedBean to build up a context and process a Velocity template which outputs RSS in the right format. I also have a FeedServlet which takes the input from the web tier and simply passes it to the Bean. All in all, a few hours worth of work and now we have a far more functional website using the latest cutting edge technologies. I love it. I wonder if the PicLens people envisioned their product being used for hardcore porn. I hope so.

No comments: