Solved

Configuration Pattern - .NET Application - Config database

Posted on 2009-04-01
2
290 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now