Config settings.

G

George Ter-Saakov

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

Cowboy \(Gregory A. Beamer\)

Downside? Just the memory taken up if you are not using the 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.
 
R

Ravikanth[MVP]

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

George Ter-Saakov

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,085
Messages
2,570,597
Members
47,218
Latest member
GracieDebo

Latest Threads

Top