Jump to content

Archived

This topic is now archived and is closed to further replies.

fotobleu

XML vs DB for config file that will be editable trough the app by the user

Recommended Posts

???

hi, i'm making a simple application

i'm thinking of using an XML file as the configuration file for the app,

the user will be able to update the config file very easily trough an html form

throughout the lifetime of the app, after i deploy it and some users install and use it

future versions of the app will have more configuration options and more features therefore i will have to change the config file frequently, in my thinking i dont think its wise to use a DB, because every time a user updates to a new version of the app i would have to change the database, is that a good thing or a bad thing in your guys/girls opinion.

 

if i choose to go with the xml file, will accessing it every time a page renders slow my app down more than a database call?

 

and another issue is that i would like to store login username,pass(hashed) in the config file with the other config info so that the update process from app versions would be made easier

 

thanks

Share this post


Link to post
Share on other sites

1. Store core settings (like crucial file paths, database connection details) in an XML file.

 

2. Anything else is candidate for either. Keep any other XML separated from the core settings. Abstract the storage method so you can switch later if required.

 

If you're application is really lightweight, you can get away with just XML. As the application gets bigger (especially when the amount of processed data increases), the XML parsing will get noticeable. So make sure your business logic is separated from your data integration logic.

 

There is some gain to XML only apps, such as database vendor independency (without the need for an abstraction layer). But you may just want to draw a line somewhere and use a common RDMS after it.

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.