Jump to content

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


fotobleu

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

Link to comment
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.