IT Community - Software Programming, Web Development and Technical Support

Config File or Registry

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 ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Servers and Hosting > Server Management

Register FAQ Members List Calendar Mark Forums Read
  #1  
Old 06-14-2009, 09:37 PM
shaalini shaalini is offline
D-Web Architect
 
Join Date: Apr 2007
Posts: 633
shaalini is on a distinguished road
Default Config File or Registry

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...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 06-14-2009, 09:39 PM
bluesky bluesky is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 667
bluesky is on a distinguished road
Default Re: Config File or Registry

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,
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 06-14-2009, 09:40 PM
shaalini shaalini is offline
D-Web Architect
 
Join Date: Apr 2007
Posts: 633
shaalini is on a distinguished road
Default Re: Config File or Registry

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...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 06-14-2009, 09:40 PM
bluesky bluesky is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 667
bluesky is on a distinguished road
Default Re: Config File or Registry

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.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 06-14-2009, 09:41 PM
arjkhanna arjkhanna is offline
D-Web Incredible
 
Join Date: Mar 2007
Posts: 1,949
arjkhanna is on a distinguished road
Default Re: Config File or Registry

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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


All times are GMT -7. The time now is 01:23 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0