configuration of applications -- XML or Properties files?
Hi all
I am building a customer website on Jakarta tomcat 5.5.9 and struts. This is going to be a customer login site where the customers will be able to login in, see their bills online (run reports and pdf) and do some other functionalities like user management etc.
I am trying to make the website an extensible and robust application. I have incorporated -- 1) a robust exception handling framework with struts declarative exception handling 2) a neat abstract factory pattern etc.
I am putting as many configuration information in a file as possible. The various configuration properties that i have abstracted out -- to be put in a configuration file are as follows --
a) DAO queries
b) parameter which tells the application whether the database is oracle, mysql, sybase etc etc so that those dao queries are picked from the file (by the way, i want to make my application database independent).
c)other application parameters like --
1) email settings (system admin emails).
2) Jasper report settings.
3) logging file settings.
my problem is there is a confusion whether to make this configuration file anXML file or a properties file?
Proponents ofXML file say it is application independent, universally accepted, is so flexible, can hold hierarchical data, easy to maintain etc etc.
Proponents ofproperties file (as a configuration medium) say -- it is a flat file with simple name-value pairs so it a very fast medium and since a parsed XML tree takes much RAM memory and since XML is so slow (and takes system resources), it is wise to use properties file as a configuration medium.
Can any expert please advice me which way to go now? should i go for a flat but somewhat clumsy method of properties file or a hierarchical, easily maintainable but slow and heavy XML file?
please advice me on this thread as soon as possible. any suggestions will be highly appreciated.
regards,
Vaibhav Beohar

