This is a discussion on Config File or Registry within the Server Management forums, part of the Servers and Hosting category; Config File or Registry With the .Net one of the big change is config file coming as a part and ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Config File or Registry With the .Net one of the big change is config file coming as a part and partial of the application. Is this the recomended way of doing it. If we put our configuration in the registry if there are anything common it would be easy to share amoung the other applications. I would like to know others view on this. Appritiate your valuable comments
__________________ Shaalini.S ![]() Be the Best of Whatever you are... |
|
#2
| |||
| |||
| Hi, Your question is very broad so it's difficult to give a specific answer. I think this can be a solid approach depending on the behavioral variation that you desire from your application. Just to provide a very simple example, suppose that your application would connect to a particular resource (DB or web service for instance) depending on some characteristics of the user. You might provide those different resource strings (URLs or connection strings or whatever) though a config file. I submit that many folks use config to vary thier app's behavior to avoid recompiliation. Of course WCF makes extensive use of config files. As do ASP.NET web sites. There are some limitations to config files. If you want to vary the behavior that's provided through a DLL, the config has to go parent exe's file. Does this help? Again, without knowing the specifics, |
|
#3
| |||
| |||
| Hi, Thanks for feed back. I will explain the scenario in bit details. When we putt the stuff into the configuration file there are lot of common configuration duplicated such as database user name password etc. If it is in the registry it can be shared easily among the other application. In a situation where database or serve name change it will be a pain to update all the place you have these in the configuration. If it is in the registry or in a database centrally located it would be very easy to do the changes. Even a situation like GST change or Staff Discount change it would be very easy to change. If I am looking in a support or maintainability of the application with the changes to business needs it would be much easy store the configuration data in a central place rather than in the individual files.
__________________ Shaalini.S ![]() Be the Best of Whatever you are... |
|
#4
| |||
| |||
| Hi, understand your scenario more. The registry can be useful for consistent/simultaneous configuration of multiple applications. I wonder if you worry about security of the informatin that's in the registry. This is also a question in the config file approach as well. Depending on the volatility of this information, I'm not sure this is really configuration. It sounds like data for the application do it's work. It might also make sense to put some of the data into the database. GST and discount rates might not be something that you want to keep in a config file. You might want to keep this data in a data store that can be changed centrally rather than per application installation. |
|
#5
| |||
| |||
| Hi, This is a long old debate where industry take swings every few years. The OS guys can't live without registry while application developers want everything to be in configuration file. What really required is a coordinated effort to define a framework in which we can utilize best of both worlds. I've written an article on the subject & I hope that It can help create a system in which every stake holder OS, Developer and User can exercise their expertise easily. My complete article can be found at Registry or Configuration files | G3itcon - Open Source and Linux solution provider
__________________ A.Rajesh Khanna |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Web.config | nhoj | ASP and ASP.NET Programming | 8 | 12-10-2007 11:07 PM |
| Change the Asp.net (C#) Web.config file | a.deeban | ASP and ASP.NET Programming | 1 | 08-18-2007 04:42 AM |
| What is Machine.config? | H2o | ASP and ASP.NET Programming | 1 | 07-24-2007 03:18 AM |
| How to encrypt app.config file in .net.? | bluesky | C# Programming | 0 | 07-17-2007 10:59 PM |
| How to Edit the web.config file elements using c#? | Archer | C# Programming | 0 | 07-17-2007 10:55 PM |
Our Partners |