[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Configuration, take2
So there are three propositions as to how exactly to store configuration.
1. Use XML
2. Use SQL database
3. Use INI format
Each of them have advantages and disadvantages, so think right thing to
do is to provide
generic interface, and few implementations.
Now, there are few choises as to interface itself.
1. Provide very generic chierarchical interface:
config.getNode(parent=NULL, name)
node.getParam(node,name)
2. Provide somewhat specialized interface
config.getParameter(name)
config.getApplicationList()
application.getParameter(name)
application.getServlets()
servlet.getDSOPath()
servlet.getParameter(name)
3. Provide strictly structured interface
Pretty much same as 2, but also provide mandatory params
i.e. config.getDefaultSessionTimeout();
application.getSessionTimeout()
application.getName()
application.getDesc()
Thoughts?
--
Ilya A. Volynets-Evenbakh
Total Knowledge. CTO
http://www.total-knowledge.com