0

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.

7
  • If database tables are not an option, would simpler key-value stores be ok? Commented Jun 9, 2012 at 16:25
  • 1
    Based 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. Commented 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. Commented Jun 9, 2012 at 16:34
  • 2
    It 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. Commented 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. Commented Jun 9, 2012 at 16:37

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

yeah. you are abs right. I am on same track as you were... and I think some kind of management tool is the answer. Thanks for your input.
1

You could always use JSON stored in text files, which is light-weight compared to Xml and still clear and understandable, and can be easily serialized and de-serialized to C# objects.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.