Re: Config file to turn on/off features ?

From: dw (dw_at_discussions.microsoft.com)
Date: 11/19/04


Date: Fri, 19 Nov 2004 13:05:02 -0800

Thanks for the advice.

This is a PocketPC based app and there will be a database (SQL CE)....so
storing there might prove the best solution.

 - dw

"mdb" wrote:

> "=?Utf-8?B?ZHc=?=" <dw@discussions.microsoft.com> wrote in
> news:B5F6E2D6-BBA1-4B33-8FCA-EB0388F8EBD1@microsoft.com:
>
> > I am working on a project where I need to be able to turn on/off some
> > features based on whether the user has purchased a particular feature.
> > And, the current UI has a tab control which I need to hide (or
> > remove) tabs based on this as well. My original plan was to use an
> > XML config file and use that to determine whether a user gets to see a
> > feature (or a tab page) and then remove or hide as necessary.
>
> I've used that technique several times in the past... works fine. Other
> places you could store configuration are in the registry or a database.
> The determination of which one to use should be made by your particular
> requirements... XML files for configuration are easy for users to edit,
> and don't make unnecessary alterations to the system, but may also allow
> the user to corrupt the config file. Registry is a bit harder for users to
> get into (they need to know about "the registry" to start with, and they
> need to know where you are storing your data) but "require" special
> routines to remove the values when the program is removed. Database can
> make it very difficult for users to change values outside your program but
> require either additional programs to run (MSDE or mySQL for example) or
> require some kind of network connection.
>
> Bottom line: XML for config files works great and is easy to use and clean
> up, but can cause problems if you have curious (and careless) users.
>
> -mdb
>



Relevant Pages

  • Re: SQL in the base system
    ... registry, to the point that the boot process also uses it. ... How hard is it to figure out that the database is ... so corrupt you aren't going to get anything out of it, ... repository so you can't check in xml files that don't validate. ...
    (freebsd-hackers)
  • SQL in the base system (Was: New FreeBSD package system (a.k.a. Daemon Package System (dps)))
    ... Someone has already pointed out the horror that is the Windows ... it's config system as they do about the Windows Registry. ... How hard is it to figure out that the database is ... Someone else mentioned XML. ...
    (freebsd-hackers)
  • Re: SQL in the base system
    ... registry, to the point that the boot process also uses it. ... How hard is it to figure out that the database is ... If you would get a corrupt block in the middle of a complex text file, it would wedge your system just as bad as if you got a bad block in a table in the database. ... repository so you can't check in xml files that don't validate. ...
    (freebsd-hackers)
  • Re: Saving User Application Data
    ... XML, Database and Registry are all possible choices. ... Check out the Configuration Management Application Block, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: .NET version of INI files ?
    ... >The config file. ... Configuration files are XML files. ... I'm at least hoping that registry abuse tapers down. ... I've seen a spyware checker that ...
    (microsoft.public.dotnet.languages.vc)