Re: [extremeprogramming] About placing configuration defaults
"Tim Ottinger via Groups.Io" <[email protected]> Tue, 19 Nov 2019 16:04:29 +0000 (UTC)
| Newsgroups | gmane.comp.programming.extreme-programming |
|---|---|
| Message-ID | <[email protected]> |
I would not blush. I think that the first thing is to separate configuration from operation. Most configuration should be changeable by operations people or by apps without having access to the directories or databases where the programs are stored (for instance, an environment variable points to a configuration directory tree somewhere, where all the configuration is done; or a separate configuration service has its own db). Being kind to ops is always a good idea. But then otherwise, it depends a bit. If the default for one value depends on the values selected in other UI elements (or data elements) then it’s code and the configuration gets fuzzy. Again, having a service or table with groupings in it probably should be a special case, and I suppose could be part of a database separate from server configs. Sent from Yahoo Mail for iPad On Tuesday, November 19, 2019, 8:28 AM, Luiz Esmiralha <[email protected]> wrote: Hello XP people, I am not sure if here is the right place to ask such a question, but I know there are lots of people here that can program circles around me, so I will give it a shot. If I am off-topic, well... sorry. :) Anyways, I've been thinking about configurations and defaults. And I would like to know what are your thoughts on where to place defaults. Would you centralize them all in one single place (such as a Configuration class at the very edge of the system) or delegate each one to the components/classes actually using it? My concrete case is (yet another) small test framework driven by a CLI. There is some configs such as a folder to read the specs from, api keys, URLs and so on. Some have sensible defaults, some don't. At the moment, the configuration defaults are decided by the args parser and passed on to a Configuration object that is used in every other place. What would you do instead? After writing it, the question seems so basic that it makes me blush a bit. But that's me: always wondering if someone knows a better way of doing what I do. Thanks a lot, Esmiralha -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#160231): https://groups.io/g/extremeprogramming/message/160231 Mute This Topic: https://groups.io/mt/60557252/2417047 Group Owner: [email protected] Unsubscribe: https://groups.io/g/extremeprogramming/leave/4902963/619838065/xyzzy [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-