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:
- Index images on the file system given a repository location so they can be shared.
- Expose EXIF metadata.
- Protect resources in the repository tha should not be shared.
- Resize and scale images on the fly.
- Implement a caching strategy for resized and scaled images.
- Allow for the view to be driven by a template.
- 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:
- Tomcat as the servlet engine
- Velocity as the templating engine
- EXIF Metadata Extractor
- A host of otherApache Commons jars.
More to come…