I have .net 4.0 silverlight project and I save many application and/or user specific configurations in external xml files. By application specific configurations means project name, urls, specific UI configurations, etc. As my application grew so the number of these xml configuration files and content inside each xml files. So my question is: Is there any alternative in .net to store these kinds of values else where? Previously I had all these values in database tables, so that option is not there. I am looking for a way of some different kind of repository or some way to modularize my growing xmls. Thanks.
-
If database tables are not an option, would simpler key-value stores be ok?Filip– Filip2012-06-09 16:25:06 +00:00Commented Jun 9, 2012 at 16:25
-
1Based on what you've said I fail to see how an other storage mechanism is going to solve the underlying issue, i.e. too many config files in play.Tony Hopkinson– Tony Hopkinson2012-06-09 16:28:33 +00:00Commented Jun 9, 2012 at 16:28
-
@Filip: thanks for comment. By key-value stores you mean storing config values when application is running? but I will have to retrieve those values from somewhere i.e. xml or db. and I will have to make that key-value list may be static which is not preferable.Mayank– Mayank2012-06-09 16:34:49 +00:00Commented Jun 9, 2012 at 16:34
-
2It would be useful to know why Xml is not suitable or less desirable. As Tony said above, any alternative would still need to cover the same amount of settings, data. So you'd still lots of config settings to manage.jussinen– jussinen2012-06-09 16:35:17 +00:00Commented Jun 9, 2012 at 16:35
-
@TonyHopkinson: yes I know... but as these xml files get larger, its very difficult for user to configure application and for developer also its tough to maintain the file. I can divide into multiple xml files but then will have to keep track of what configuration goes in which xml file.Mayank– Mayank2012-06-09 16:37:24 +00:00Commented Jun 9, 2012 at 16:37
2 Answers
Sounds to me like your problem isnt the actual format of the data, its the configuration management process that is getting more demanding. You might wanna think about implementing a simple management tool to help you (or other people) manage your configuration data, and then the choice of data format is secondary.
In my current company, configuration management evolved quite naturally. First we put most of our configuration in a configuration table in our database. Then we changed it and put it in XMLs and we put those XMLs in our database. Then we refactored those XMLs to a canonical format and implemented a GUI tool that edits them so that a monkey can do the configuration. Its certainly not perfect, but we are pretty satisfied.