Tip: When is it best to use a configuration file?

Given that there are multiple ways to collect configuration data, when is it best to use a configuration file instead of via a user interface? This is actually a very difficult question to answer definitively. Consider the following:

  • Will the configuration property need to be modified frequently? If so, you may consider implementing a UI for sheer convenience.

  • Will setting the configuration property need to be a highly privileged right on the system? If so, then by placing it is a config file you ensure that only users with direct access to the file system will have permission to edit it.

  • How quickly do I need to introduce a new feature I am planning that requires configuration? If the answer is soon, then there is no quicker way to provide configurable features then via a config directive.

  • Will my feature need to be configured on a blog-by-blog basis? If so, then a config directive is not likely to be an ideal solution.

This page was last updated on 2008-12-25, 03:05.  

Leave a note

Have a question, please use the MT Forums. Notes sumbitted here should pertain to tips & hints regarding documentation. Your note may be removed once it's contents has be integrated into the body of the page.