One coldbox.cfc has been loaded, I need to be able to dynamically change some values…these are values the user can defined for the whole application. For example, the user has only one dsn but can change between mutliple schemas within that database. The question I have, particularly for anyone that has needed to do this, is:
Where best to do something like this…interceptor, plugin
When best to do it…interception point, application.cfc
How to warehouse the user definable data…json configuration file or database…and if the latter, how are my choices limited to access things?
No matter what, when the user commits to some change, the framework must be reinitialized, which is fine…and I thought I might consider just writing code to rewrite the coldbox.cfc but that’s not a good choice in my mind. I really like the json data approach…the current system has way more options that are user definable then need to be in the rewrite so what I was thinking, using the DSN example, is after coldbox.cfc is loaded, a JSON configuration file is loaded and then using the exposed api to control coldbox config, I’d update those values. This only needs to happen at the application scope level.
Any thoughts?
Mike