Externalized Properties was inspired by the The Twelve Factor Methodology's section III. Config.
The goal of this library is to make it easy for applications to implement configuration best practices by providing easy-to-use APIs as well as providing the flexibility to choose where to store their configurations/properties.
Externalized Properties takes full advantage of Java's Dynamic Proxies.
Why Dynamic Proxies?
* Dependency Injection Friendly
Since Externalized Properties works with interfaces, it makes it easy to integrate with dependency injection (DI) frameworks. it's as simple as building ExternalizedProperties, initializing a dynamic proxy from an interface, and registering the proxy interface to your chosen DI framework.
* Testing Friendly
Another side-effect of being dependency injection friendly is that it also makes it easy to mock/stub out configurations/properties on unit tests. It's as simple as creating a stub implementation of the proxy interface or using mocking frameworks to mock the proxy interface.
I use PKL for most of my configuration needs these days. But PKL is only a format, it doesn't say where to store the config. Could I use Externalized Properties to e.g. fetch config from some random source but have it be PKL?
The goal of this library is to make it easy for applications to implement configuration best practices by providing easy-to-use APIs as well as providing the flexibility to choose where to store their configurations/properties.
Externalized Properties takes full advantage of Java's Dynamic Proxies.
Why Dynamic Proxies?
* Dependency Injection Friendly
Since Externalized Properties works with interfaces, it makes it easy to integrate with dependency injection (DI) frameworks. it's as simple as building ExternalizedProperties, initializing a dynamic proxy from an interface, and registering the proxy interface to your chosen DI framework.
* Testing Friendly
Another side-effect of being dependency injection friendly is that it also makes it easy to mock/stub out configurations/properties on unit tests. It's as simple as creating a stub implementation of the proxy interface or using mocking frameworks to mock the proxy interface.