JSON Image Gallery

So, I’ve been considering an image gallery alternative to Apache::Gallery. I like the simplicity of indexing and sharing images using EXIF metadata and the file system as opposed to using a database. Apache::Gallery delivers on this and has been great thus far. One thing that I really like about Apache::Gallery is the ability to use a templating package to customize the image and index views. However, after looking at the perl module, it seems like quite a bit of HTML has made its way into the module itself. This makes it hard to alter the templates in certain ways. Not to mention the fact that most of the module logic is jammed into a mod_perl handler block. This makes it hard to maintain if I did decide to modify the module itself.

That said, I decided to put together a simple, servlet implementation based on Apache::Gallery. My servlet will be pretty straightforward as it needs to accomplish the following:

  1. Index images on the file system given a repository location so they can be shared.
  2. Expose EXIF metadata.
  3. Protect resources in the repository tha should not be shared.
  4. Resize and scale images on the fly.
  5. Implement a caching strategy for resized and scaled images.
  6. Allow for the view to be driven by a template.
  7. The thumbnail index should be paginated.

Apahce::Gallery has quite a few more features, but these are the main ones that I need.

I’ll use the following tools:

  1. Tomcat as the servlet engine
  2. Velocity as the templating engine
  3. EXIF Metadata Extractor
  4. A host of otherApache Commons jars.

I’d like to introduce JSON into the mix as part of the template generation. I’m considering an Ajaxy client and libraries like Dojo or Ext JS will do nicely.

More to come…