We need to customize a desktop application at compile time. Users cannot change the configuration. Only developers and release managers can do it.
The configuration is a little complex. There are more than 10 modules. Each module needs configuration including values, capability flags, etc. We have 5 configuration groups called profiles.
Now, I shall choice one of two options. First one is programmatic approach. We can create configuration interfaces for each module and implement them for each profile. The alternative is that using configuration files. I like programmatic approach due its flexibility (e.g we can inherit a profile from another one). Also, it provides compile time check. But configuration files (like XMLs) are easy to maintain and understand.
Maybe, a mixed approach will be the best. But, I'm not sure how to do that. Have you any idea?