in reply to Re: Re: Re: dependencies and loose coupling
in thread dependencies and loose coupling
Another solution is to have a registry of some kind (e.g. JNDI in Java), which is basically what your environment variable suggestion would amount to. That's not terrible either, but gets unwieldy at a certain point. By the time I have more than two ENV variables, I usually want them in a conf file of some kind.
What I've decided at this point is that it's too small an issue to worry about yet, and I'll just hard-code the name of the config class for now and wait until I have things more complex than DBI parameters to worry about. If you're interested in how people handle this in other languages, see Martin Fowler's article on the subject.
|
|---|