RE: Solution for storing a lot of web app configuration ?

Tech-Archive recommends: Fix windows errors by optimizing your registry



I think custom classes that can be serialized / deserialized into XML is a
good solution. Here's an article that touches on a similar topic:

http://www.eggheadcafe.com/articles/20051013.asp

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"hendry.johan@xxxxxxxxx" wrote:

> Hi,
>
> I'm currently developing an HR system which involves storing a lot of
> configurations per module, such as payroll module, absence/shift
> module, training module, etc. total: around 100 configuration items.
>
> Configurations here, ranging from a simple key to value pair, a key to
> multiple values, and a key to several records of a / multiple values.
> Let me give an example to clarify this:
>
> * [Key to value] Percent of X tax to deduct from employee salary = 5%.
>
> * [Key to multiple values] Limit (days) of employee taking a leave
> between: 1 - 5.
>
> * [Key to several records of a / multiple values]
> a. Employee level entitled to one holiday per month: Manager,
> Supervisor, Vice Manager.
> b. Regulation on annual tax deduction: Manager -> 1%, Supervisor -> 2%,
> Vice Manager -> 3%.
>
> My current solution is to store all those configurations in a table,
> e.g tbSETUP, which roughly has these fields:
> Key <= this is the ID for the setup, not unique (hardcoded in app)
> Value1 <= this is value number 1
> Value2 <= this is value number 2 .. until 5.
>
> Everytime I need to read these configuration, I will have to query the
> table with the appropriate Setup ID and convert the value to my desired
> data type, such as integer to include calculation. And this is becoming
> so tedious typing it all over again.
>
> Is there any elegant solution for storing and reading all these
> configurations, or at least save time from converting all the
> configuration value type?
>
> I've tried googling a while and found some interesting topic on this
> matter, a little bit similar to my situation, (such as serialize in xml
> files, creating custom class xml, etc.), but I think this will be more
> or less the same with my current solution.
>
> Any opinion is appreciated :)
>
> Thank you,
> Hendry J
>
>
.



Relevant Pages

  • Re: Howto read line from a stream
    ... XML editor that lets them write consistent ... configurations and no others and uses XML behind the ... Your middleware program will process ... it cannot be outside my responsibility. ...
    (comp.lang.ada)
  • Novice question about namespaces
    ... I have heard that using xml for configurations on applications is a good ... "http://tempuri.org " showing up automatically when I create the schema. ... to a web site in order to use xml. ...
    (microsoft.public.dotnet.xml)