Caroline,
One more consideration is to think about how often your application will be
restarted and how many users you will have. This will affect how you design
your application for reading the properties. Coding it so that every time
the list is requested the values are retrieved from the database would
ensure that the users will always see the most current changes to the values
however it would cause an added burden on the system if you had a lot of
requests. Coding it so that the values are read once at startup is more
practical but requires that you restart your application whenever a change
is made. Hardcoding it in a source file might require a round of QA testing
after a change is made.

Regards,

Richard


-----Original Message-----
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 20, 2003 2:51 PM
To: 'Struts Users Mailing List'
Subject: RE: Keep Them In the Database Or In the Properties File?


Caroline,
A third option is to hardcode the options by putting them in an initializer
for a string array. One of the main criteria you need to ask yourself is
"How often are these values likely to change?" If they may change often
(daily, weekly, monthly,
etc.) then a database might be the best bet. Otherwise, property files are a
good way to go. However, if they are likely to never change, then I think
you might avoid some overhead and potential maintenance problems by just
hardcoding them in one of your classes. This also avoids having to add code
to read the values and possibly parse them into substrings.

Regards,

Richard


-----Original Message-----
From: Caroline Jen [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 20, 2003 1:56 PM
To: [EMAIL PROTECTED]
Subject: Keep Them In the Database Or In the Properties File?


I have to prepare many drop down lists for visitors of
the website to make selections.  For example, I have
the 51 states of the United States prepared like
Virginia=VA, ....., etc.  Do I keep the data in a
database or in a properties file?

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to