Skip to content
nateroe edited this page Mar 31, 2018 · 9 revisions

A web app that implements a photography website to showcase a single photographer's work.

This project is in development and has not been released.

Overview

There are many possible features (see Requirements). Here I will describe the features that are currently implemented.

Photo Import

On the server while Java EE is running, a daemon thread periodically inspects a local directory for new files. This directory is configured as import.HANDOFF_DIRECTORY in natephoto.properties ("the hand-off directory"). When new JPEG files are found in the hand-off directory, they are imported.

Importing JPEG files consists of reading the relevant EXIF tags, producing several smaller scaled versions of the original, adding data to the database, moving the image files into import.DESTINATION_DIRECTORY and possibly uploading into Amazon S3.

EXIF tags are read by delegating to exiftool on the command line and parsing the results. These EXIF tags are imported:

-Title -Description -Rating -DateTimeOriginal -Model -LensModel -FocalLength -ApproximateFocusDistance -FNumber -ExposureTime -ISO -Flash -GPSLatitude -GPSLongitude -GPSAltitude -Rights -UsageTerms

Optionally, one can import an expedition. An expedition is any directory containing JPEG files found in the hand-off directory. The directory may optionally include a file named expedition.json. Expedition is a simple class, and this JSON file most usefully contains the name and description of the expedition:

{
    "title": "Olympic National Park",
    "description": "This trip was a few days at Second and Third Beach, south of La Push, Washington."
}

Expedition also included begin and end dates, but these are calculated automatically from the expedition's photos during import.

When photos and expeditions are successfully imported, files are removed from the hand-off directory. If the files were uploaded to S3, then the local files in import.DESTINATION_DIRECTORY are also removed.

Re-importing a file updates the existing database record and does not insert a duplicate. For photographs, both the filename and the EXIF date must be the same. For expeditions, the only the path to the re-imported expedition.json file must be the same.

User Interface

Navigation

An ever-present nav bar links to Home and Expeditions.

Home

The Home page ("/") presents a gallery of the photographer's best work. To do this, the back end queries the database for the 25 best photos with a rating of at least 4 (of 5). The photos are then shuffled before display. Rating comes from the EXIF data and is assigned by the photographer during processing.

In this and any gallery, the user can click a photo to go to Photo Details.

Expeditions

The Expeditions("/expeditions") page displays a list of expeditions, most recent first. Each expedition's title and date or date range are displayed, and then one row of highlights from that expedition. The "one row" is responsive and could consist of one, two, three, or more photos depending on the width of the user's browser. Highlights are defined as all photos rated at least 4, sorted by rating in descending order so that the best photos are most likely to be displayed.

The title of each expedition links to the Expedition Details. Each highlight photo links to Photo Details.

Expedition Details

The Expedition Details page displays a single expedition. The name, description, and date or date range are displayed, along with a gallery of all of the expedition's photos, in chronological order. Each photo links to Photo Details.

Photo Details

The Photo Details displays a given photo as large as possible in the user's browser. This page also displays the image title, description, and other EXIF data.

Clone this wiki locally