Key Concepts

Key points to know about what AndHow is and does

AndHow Properties are configurable constants

AndHow Properties are constants in your code, except their value is loaded when your application starts up. Once loaded during initialization, Property values are immutable and will not change for the run-life of the application.

AndHow initializes and loads property values only once at startup

Initialization is AndHow's startup/bootstrap process where it discovers all Properties in your application, scans multiple configuration sources to load values for them, and validates them. This will only happen once in the run-lifecycle of the application and once completed, the list of Properties and their values will never change.

AndHow Fails Fast... and that is a good thing

AndHow detects invalid configuration at startup to fail fast.

Failing late is the alternative. Failing late might mean that a misconfigured application runs for a few days, then mysteriously fails when a misconfigured feature is first used ~BOOM~ You'll get the call in the middle of the night. Wouldn't it have been nice to see that error at startup?

Property Names are CaSe InSeNsItIvE

For compatibility with Windows environment variable names, property names are case insensitive. Proper case names are still used internally for reporting and when creating configuration sample files. One exception to this is JNDI, which is inherently case sensitive.

Null Handling

AndHow does not have an explicit null value. If a Property is not set, it is null unless it has a default value.

Configuration Sources and Loaders

AndHow uses Loaders to load Property values from configuration sources such as System.Properties, environment variable, system properties, JNDI, properties files, etc.. Loaders work on a 'first win' basis: The first loader to find a non-null for a Property sets the value.

Thus, the loader order is significant and well established. The standard Loader order will work for most applications, but if needed, the load order can be changed, loaders removed and other loaders added.

Last updated