Application config files - pros and cons 
Author Message
 Application config files - pros and cons

Hello

As I'm very new to .net, I'm not sure whether it is useful to use the
standard application configuration files. Although the .config-files provide
a convenient way to access configuration parameters, there could be some
drawbacks while progressing (maybe not so flexible, portability of
components, etc). At the moment, I'm not sure whether I should use my own
XML configuration files and just provide their paths within app.config or
not. Are there benefits beyond the easy access to appSettings-Elements?

What's your advice?

Thank you

Philipp



Tue, 23 Nov 2004 04:51:26 GMT  
 Application config files - pros and cons
I would sidestep the question and suggest you create one or more classes
which have properties which encapsulate your configuration settings.
Initially you could store the settings in the standard application
configuration files - if you see a reason to do otherwise later on, you only
need to change your configuration class(es).  The old practice of deferring
design decisions until as late as possible.

Annie


Quote:
> Hello

> As I'm very new to .net, I'm not sure whether it is useful to use the
> standard application configuration files. Although the .config-files
provide
> a convenient way to access configuration parameters, there could be some
> drawbacks while progressing (maybe not so flexible, portability of
> components, etc). At the moment, I'm not sure whether I should use my own
> XML configuration files and just provide their paths within app.config or
> not. Are there benefits beyond the easy access to appSettings-Elements?

> What's your advice?

> Thank you

> Philipp



Tue, 23 Nov 2004 05:07:22 GMT  
 Application config files - pros and cons
Hello Annie

...sounds reasonable :-)

Let's say I'd use the standard files - is it the same to change its values
as with custom XML files or does the framework

- provide a more convenient access to write to the file (just saw a reader
class while stepping through the docs)
- lock the file (read-only)

Thanks again

Philipp



Quote:
> I would sidestep the question and suggest you create one or more classes
> which have properties which encapsulate your configuration settings.
> Initially you could store the settings in the standard application
> configuration files - if you see a reason to do otherwise later on, you
only
> need to change your configuration class(es).  The old practice of
deferring
> design decisions until as late as possible.

> Annie



> > Hello

> > As I'm very new to .net, I'm not sure whether it is useful to use the
> > standard application configuration files. Although the .config-files
> provide
> > a convenient way to access configuration parameters, there could be some
> > drawbacks while progressing (maybe not so flexible, portability of
> > components, etc). At the moment, I'm not sure whether I should use my
own
> > XML configuration files and just provide their paths within app.config
or
> > not. Are there benefits beyond the easy access to appSettings-Elements?

> > What's your advice?

> > Thank you

> > Philipp



Tue, 23 Nov 2004 06:41:13 GMT  
 Application config files - pros and cons
I'm fairly new to the .NET framework so I don't really know the answer.
I haven't seen anything explicit on writing to the standard configuration
files.
So on the same basis of deferring design decisions I'd use wrapper classes
for read/write config settings (e.g. user preferences) and in the short term
store them somewhere which is easy to access - say the registry or a
database.  Then revisit the issue further down the line...

I'm just avoiding your question rather than answering it, maybe someone else
will be more help :)

Annie


Quote:
> Hello Annie

> ...sounds reasonable :-)

> Let's say I'd use the standard files - is it the same to change its values
> as with custom XML files or does the framework

> - provide a more convenient access to write to the file (just saw a reader
> class while stepping through the docs)
> - lock the file (read-only)

> Thanks again

> Philipp



> > I would sidestep the question and suggest you create one or more classes
> > which have properties which encapsulate your configuration settings.
> > Initially you could store the settings in the standard application
> > configuration files - if you see a reason to do otherwise later on, you
> only
> > need to change your configuration class(es).  The old practice of
> deferring
> > design decisions until as late as possible.

> > Annie



> > > Hello

> > > As I'm very new to .net, I'm not sure whether it is useful to use the
> > > standard application configuration files. Although the .config-files
> > provide
> > > a convenient way to access configuration parameters, there could be
some
> > > drawbacks while progressing (maybe not so flexible, portability of
> > > components, etc). At the moment, I'm not sure whether I should use my
> own
> > > XML configuration files and just provide their paths within app.config
> or
> > > not. Are there benefits beyond the easy access to

appSettings-Elements?

- Show quoted text -

Quote:

> > > What's your advice?

> > > Thank you

> > > Philipp



Tue, 23 Nov 2004 14:18:55 GMT  
 Application config files - pros and cons
Hello Annie

Thanks for your feedback. By now I think it'll be the most flexible solution
to write a configuration component that provides easy read/write access to
custom config files...

Quote:
> I'm just avoiding your question rather than answering it, maybe someone
else
> will be more help :)

indeed :-))

Best wishes

Philipp



Tue, 23 Nov 2004 16:58:56 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Memory-mapped files - pros and cons of mapping view on whole file

2. Pros and cons of putting files in an exe

3. Pros and Cons of register int

4. Labels .. Pros and Cons

5. DataSet--pros and cons

6. pros/cons of C

7. Dynamic Storage Allocator Pros and Cons

8. Pros/Cons of J2EE + .NET (plus, java salaries are HOT)

9. Oracle Lite Pros and Cons

10. .PDB vs .DBG - Discussion of the Pro's and Con's

11. A use for GOTO (was Goto Pro's and Con's)

12. Goto Pro's and Con's

 

 
Powered by phpBB® Forum Software