473,408 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Config settings.

Hi.

I have couple config setting for my Application.
I created class with static members.

Application_Start method reads settingg from ConfigurationSettings.AppSettings and populates static class. I just found it more convenient (since now I can have default settings).

Does this approach have any flaws?

Thanks.

George.

Nov 17 '05 #1
6 1297
Downside? Just the memory taken up if you are not using the settings.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Author: ADO.NET and XML: ASP.NET on the Edge

************************************************** **************************
****
Think Outside the Box!
************************************************** **************************
****
"George Ter-Saakov" <we@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi.

I have couple config setting for my Application.
I created class with static members.
Application_Start method reads settingg from
ConfigurationSettings.AppSettings and populates static class. I just found
it more convenient (since now I can have default settings).
Does this approach have any flaws?

Thanks.
George.
Nov 17 '05 #2
Downside? Just the memory taken up if you are not using the settings.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Author: ADO.NET and XML: ASP.NET on the Edge

************************************************** **************************
****
Think Outside the Box!
************************************************** **************************
****
"George Ter-Saakov" <we@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi.

I have couple config setting for my Application.
I created class with static members.
Application_Start method reads settingg from
ConfigurationSettings.AppSettings and populates static class. I just found
it more convenient (since now I can have default settings).
Does this approach have any flaws?

Thanks.
George.
Nov 17 '05 #3
Hi george

Can you tell me in detail why u r populating all settings
in to static class.

U can store all settings in application variables and use
these variables in all the pages.
HTH
Ravikanth

-----Original Message-----
Hi.

I have couple config setting for my Application.
I created class with static members.

Application_Start method reads settingg from ConfigurationSettings.AppSettings and populates static
class. I just found it more convenient (since now I can
have default settings).
Does this approach have any flaws?

Thanks.

George.

Nov 17 '05 #4
Hi george

Can you tell me in detail why u r populating all settings
in to static class.

U can store all settings in application variables and use
these variables in all the pages.
HTH
Ravikanth

-----Original Message-----
Hi.

I have couple config setting for my Application.
I created class with static members.

Application_Start method reads settingg from ConfigurationSettings.AppSettings and populates static
class. I just found it more convenient (since now I can
have default settings).
Does this approach have any flaws?

Thanks.

George.

Nov 17 '05 #5
1. Performance is better when referencing variable rather than lookup in
Collection.
2. It makes my business classes more independent from ASPX context (which is
more important than 1).

They can access connection string as long as there is clsGlobal loaded.
If I were using Application then they explicitly rely on the ASPX
environment which makes them not pure business classes (since they have
knowledge about GUI).
George.

"Ravikanth[MVP]" <dv*********@hotmail.com> wrote in message
news:0a****************************@phx.gbl...
Hi george

Can you tell me in detail why u r populating all settings
in to static class.

U can store all settings in application variables and use
these variables in all the pages.
HTH
Ravikanth

-----Original Message-----
Hi.

I have couple config setting for my Application.
I created class with static members.

Application_Start method reads settingg from

ConfigurationSettings.AppSettings and populates static
class. I just found it more convenient (since now I can
have default settings).

Does this approach have any flaws?

Thanks.

George.

Nov 17 '05 #6
1. Performance is better when referencing variable rather than lookup in
Collection.
2. It makes my business classes more independent from ASPX context (which is
more important than 1).

They can access connection string as long as there is clsGlobal loaded.
If I were using Application then they explicitly rely on the ASPX
environment which makes them not pure business classes (since they have
knowledge about GUI).
George.

"Ravikanth[MVP]" <dv*********@hotmail.com> wrote in message
news:0a****************************@phx.gbl...
Hi george

Can you tell me in detail why u r populating all settings
in to static class.

U can store all settings in application variables and use
these variables in all the pages.
HTH
Ravikanth

-----Original Message-----
Hi.

I have couple config setting for my Application.
I created class with static members.

Application_Start method reads settingg from

ConfigurationSettings.AppSettings and populates static
class. I just found it more convenient (since now I can
have default settings).

Does this approach have any flaws?

Thanks.

George.

Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dominic | last post by:
Suppose I have a web.config. I'd like to move some configuration settings from this web.config and put it another XML file (say, common.xml). Now, is there any way that I can modify the web.config...
3
by: Jeff Robichaud | last post by:
Hello, Since it is possible to put application settings in a file other than web.config, I was wondering what is the best practice in doing so vs. putting these settings directly in web.config....
2
by: Keith Elder | last post by:
Let's say you have a stand alone C# library project that is your datalayer. When this library compiles it will produce "My.DataLayer.dll" for example. In the project you use all the new...
4
by: Peter | last post by:
Hello I created a dll assembly unsing the settings (only application settings). I read a lot a lot about the new settings concept, but I still don't understand it. The settings are in two...
5
by: Keith | last post by:
Hello all, I have a C# Windows Forms app. It is in namespace App.GUI. It builds to Nav.exe. I have entered an application level setting using the designer. Its type is string, name is "FOO"...
8
by: aabdis | last post by:
Hello All.... I have a question... i have two Windows apps (one UI, and one service) which use a common DLL that hands out database results and such to the two apps. The DLL always connects to...
6
by: TS | last post by:
I cannot get this to work. I added an app.config to a project i reference from my web application project (vs 05) but can see no way to access the settings within it. the other thing is that I...
10
by: =?Utf-8?B?TUNN?= | last post by:
When creating a new VB Web Application Project with VS2008, there are several settings (compiler settings, option strict, etc) that appear both in the web.config file and "My Project". I'm...
3
by: Piotrekk | last post by:
Hi I have a problem connected with user.config file. I am using default settings.settings . To settings.settings I am adding one user scope string and one application scope string. Thus...
9
by: antonyliu2002 | last post by:
By default, IIS is configured to timeout a session in 20 minutes, which can be changed through the IIS config window. I use InProc sessionState mode. I can also set the session timeout in...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.