RE: Solution for storing a lot of web app configuration ?
- From: "Peter Bromberg [C# MVP]" <pbromberg@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 5 Dec 2005 08:39:04 -0800
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
>
>
.
- References:
- Solution for storing a lot of web app configuration ?
- From: hendry.johan@xxxxxxxxx
- Solution for storing a lot of web app configuration ?
- Prev by Date: Re: Simple math program.
- Next by Date: Re: Simple math program.
- Previous by thread: Solution for storing a lot of web app configuration ?
- Next by thread: Re: Solution for storing a lot of web app configuration ?
- Index(es):
Relevant Pages
|