Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Configuration Pattern - .NET Application - Config database

Posted on 2009-04-01
2
Medium Priority
?
305 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 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

885 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