Thursday, August 9, 2007

Maintain Config files

Why and where we have to maintain Config Files?
Every application either accicentaly or by design have some configuaration parameters in configuaration ( .ini or .xml or .config or .properties) files.
-The config files are important in cases where certain information cannot be kept in database e.g. database connection details.
- It is good habit of maintaining config files.If the outside parameters for the application which may change in future maintain those in config files, Then it is easy to modify those parameters with out affecting the application.
- There are chances of making a mistake while editing it.
- There are some environment properties (outside our applications) which the runtime reads from the config files.
- Its usually easy to edit config files using any text editor.
- Its easier for development as it doesnot require any infrastructural code to read these parameters from the database.
- In the case of clustered application, the same parameters need to be synchronised to all nodes in the cluster.
- In case there are multiple environments, maintaining different files with most common, but some different values is cumbersome.

No comments: