Solved

Configuration Pattern - .NET Application - Config database

Posted on 2009-04-01
2
292 Views
Last Modified: 2012-06-27
Hi

I have a setup table in my database which i used for configuration of an old VB6 application.
In that application i just created a lot variables for each different configuration.

However i was wondering if there is any pattern i could follow to make my new Configuration class more clever, easier to maintain and so on.
0
Comment
Question by:mSchmidt
2 Comments
 
LVL 6

Accepted Solution

by:
HarryNS earned 500 total points
ID: 24038090
Create a class with static variables. On application start, read it from your DB and load this static variables and you can use this any where in your application.
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 24039073
i will take the approach suggested by Harry above as it will keep the things simple and easy to maintain
It totally depends on the requirements of the project at hand in which way we need to build the configuration reading mechanism in the application
in some applications if the configuration is not changing rapidly and dynamically then reading at the beginning of the application is best else the confuguration can be brought back from the database on the need to know basis but it will just include more database load and more round trips and a little more of processing and coding effort and will increase the maintenance of the project
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

823 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question