Background

Back in the Day

This project started as a solution to a problem at work that was never solved. I was on a team writing a custom ETL (Extract, Transform, Load) application that had lots of configuration options. We created a list of all of those options as array, but it was a long list with lots of strange names, so someone created a second array that had descriptions of each of the options. Worse, the options array was in the main class, but options were actually used elsewhere with no connection between an option and the class it configured. To set values for all those options some developers created properties, others passed options in on the command line, and others ran it in an environment that provided configuration values. Naturally, the loading logic became very complicated and the documentation (hidden in an array) was minimal.

I thought there had to be a better way. A way to document configuration parameters, read them using multiple strategies, and place configuration parameters where they are used. The result was AndHow. Sadly, I never managed to port it back to that project...

A breakthrough

The initial versions of AndHow were pretty cumbersome to use - You had to register each class that had Properties when you initialized AndHow. A solution to that complexity was found when I found this paper: The Hacker's Guide to Javac. The paper is pretty old (2008 and Java6), but the concept of a compiler plugin and dipping into the compile tree meant that AndHow could 'register' its own Properties at compile time, allowing it to know all available Properties when an application started up.