(gdb) break *0x972

Debugging, GNU± Linux and WebHosting and ... and ...

WebAlbums TODO list

Saturday, August 31, 2013 - No comments

Short term


  • implement “Random/By Tag” and “Random/An Album” and move the random pict to “Random/An Image”
  • ** find a way to generate N random images/albums at the same time, for the photowall (e.g., with a configuration file, RANDOM=5 ?)
  • ** improve ViewSession interface: remove inheritance and facilitate multi-view
  • get rid of star notation,
  • better TAG handling (show only/hide these tags)


  • build GUI interface for photowall (already started in Python)

Web interface

  • add geocoding to Config page: https://developers.google.com/maps/documentation/geocoding/
  • “back” button doesn’t work anymore
  • \n not handled correctly in comments (DONE)
  • find a better way to give a name to GPX traces (eg, first LINE of the description) (DONE)
  • get rid of star notation,
  • better TAG handling (show only/hide these tags)
  • allow setting METADATA, eg parse from description (for GPX)

Backend engine

  • get rid of star notation,
  • better TAG handling (show only/hide these tags)
  • give a generic miniature for GPX files
  • make METADATA more generic o remove it from PHOTO table o create a generic “photo_id -> key value” table

Refactoring WebAlbums ViewSession interfaces, and MVC stuff

Saturday, August 31, 2013 - No comments

Since a few years, WebAlbums architecture is based on a software pattern derivated from the model–view–controller (MVC): the model–view–presenter

  • The application logic is implemented in the Service beans. It contains the core engine of the application.

  • I recently added a another presentation component, based on a fuse filesystem: WebAlbumsFS. But more on that later.

The key idea of this design is that each part is independent from the implementation of the other. That’s how I could added easily a filesystem front-end, in addition to the web interface. Likewise, the album information are currently stored in a MySQL database, but if you re-write the DAO engine, you can easily switch to any other back-end, without affecting the rest of the application.

  • The interface between the DAO and Service components is stored in the iDAO package,
  • and the interface between the Presentation and Service components are stored in the iService package.

Beginning with WebAlbums

Thursday, August 29, 2013 - No comments

Beginning with the sample dataset

Go to the sample directory, and follow the instructions:

  1. put image and miniatures directories in your data directory
  2. import WebAlbums.sql to an empty database:
  • mysql -u wazari972 -p WebAlbums < ./WebAlbums.sql # (default password is ‘ijaheb’)
Beginning from scratch

When you first boot the application, its database is empty (almost empty, the default values are commited at the first start). So, let’s start adding and tagging our first photos:

  1. (a) In directory data/ftp, create a theme directory. Let’s name it Travel. (b) Inside this one, you create your first photo albums, following this name template: . For instance, 2013-03-31 Around Grenoble. Inside that, you put photos, videos and GPX files.
  2. On the website, you go to the only existing theme, Root. There, you click on the Configuration link on the right hand side. Change the first text box to Travel or whatever name you chose to your theme. Them, import.
  3. Now you can get back to the theme list and click Travel, so what… In the album page, or last albums widget, you can see the list of your albums.
  4. Locate the best photo of the theme, and click the “Edit” icon. Then, click on “Represent the theme” and validate.
  5. For each album, find the best pict and click the “Edit” icon, then “Represent the album” and validate.
  6. In the configuration page, locate the “center of theme” and click, a bit below, “Centre de la carte”
  7. Then, create tags. For instance, a guy (WHO) named Nobody. Or a place (WHERE) named Nowhere. Locate that nowhere on the map, double click to create a beacon and validate. (Field Parent appears later).
  8. Back in the albums, find picture of Nobody and/or Nowhere, click on the Tag text, type the first letters and validate. If it doesn’t work, click on the edit button and highlight the tags in the lists (that just a problem of empty databases).
  9. While you’re there, click on desc and write a description.
  10. If you come back on the configuration page, you’ll see that new box appears (like the parent box I mentioned earlier). That’s because you’ll here only the tags used in this theme, but we’re still a bit early for that. Notice that you can set the age of that Nobody guy (hover over the Nobody tag link in a photo and you’ll see his age at the shot time)

Installing WebAlbums

Wednesday, August 28, 2013 - No comments


  • Java environment
  • MySQL database
  • Linux/Unix environment (Windows is not supported, it would require a bit for work — mainly replacing / by \)


  • Download and extract the ZIP of the last release, or git clone the branch.
  • Parameter MySQL/MariaDB to allow a user wazari972 to connect from localhost with a password ijaheb, to database WebAlbums. If you changed the default values(recommended), edit conf/sun-ressource.xml accordingly:
mysql -u root -p -e “GRANT ALL PRIVILEGES ON WebAlbums.* TO ‘wazari972’@’%’ IDENTIFIED BY ‘ijaheb’;”

  • Execute start.sh or start.sh --start click to start in the tray menu if necessary, and when it goes green, click on launch. Default user is kevin with no password. You can change that in conf/config.xml.
  • Now you can start playing with WebAlbums (and jump to the next post.)

Contributing to WebAlbums

Tuesday, July 30, 2013 - No comments

Contributions or collaborations are welcomed, I’ll review any email or patch.

Check the mind-map diagram to see the libraries and languages involved in details.

See TODO post for the current plans.


Do you want to improve any of the following skills? the marks in parenthesis correspond to my level of expertise in this area and how much this skill is involved in the project.

According to Github:
  • Java 46.0%
  • JavaScript 42.5%
  • XSLT 6.8%
  • Python 1.7%
  • CSS 1.4%
  • C 1.4%
  • Shell 0.2%