in reply to Single file oriented for different usage
My current "design in progress" experimental web application environment makes heavy use of file paths to control what gets used where. Pretty much every file path from the config files, to the modules, to images, javascript source and CSS are searched and loaded as needed at run time according to first found in the path order. My production application is at the root of the search path in the "main" path. I run my test version with an extra "dev" path inserted before "main". Any file (including config files) not found in the "dev" path automatically fall back to the "main" path. When I start hacking up a new version, I copy each file I edit into the "dev" path as I need to touch it. In dev I can change anything I want, create new stuff and generally yank the application around while still using the existing prod code/data directly for anything not changing. At any time I can create a new path for testing/bugfixing/development and re-order paths on top of paths so I can test fixes on fixes.
It's actually alot slicker than my feeble description :)
More to your question, I routinely keep several different paths (main, test, dev) each with their own variation of config file (different databases, different login, different file paths). Even config file format changes between paths are not an issue.
|