Dev Shed Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOtherDev Shed Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 17th, 2013, 04:38 AM
aeternus's Avatar
aeternus aeternus is offline
For POny!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: Amsterdam
Posts: 416 aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 4 h 56 m 43 sec
Reputation Power: 114
XML vs Database

Hi guys,

I was playing a bit around with the php domdocument stuff which made me wondering the following. I noticed that quite some CMS use xml-files to accompany templates, components and plugins (pretty much third party software to extend the cms).

My question is, is this just done because it's easily (human) readable, (maybe even easier to manage)? Or is there another advantage opposed to storing for instance settings in a database. I can imagine that opening a flat file every time is more time consuming than querying a database that is designed for storing data (so maybe also settings).

Love to hear what you guys think of it.
__________________
PHP Tutorial

Reply With Quote
  #2  
Old February 17th, 2013, 05:57 AM
Jacques1's Avatar
Jacques1 Jacques1 is offline
pollyanna
Click here for more information.
 
Join Date: Jul 2012
Location: Germany
Posts: 1,837 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 1 Day 5 h 25 m 30 sec
Reputation Power: 811
Hi,

XML files are usually used for static configurations that are not supposed to be edited by non-developers. Putting that into the database wouldn't make much sense, because the data is neither dynamic nor meant to be edited through a GUI.

However, I wouldn't necessarily use the cumbersome XML. JSON or YAML is much more readable.
Comments on this post
aeternus agrees: you're right!

Reply With Quote
  #3  
Old February 17th, 2013, 06:28 AM
aeternus's Avatar
aeternus aeternus is offline
For POny!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: Amsterdam
Posts: 416 aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 4 h 56 m 43 sec
Reputation Power: 114
Hi Jacques1,

Thanks for the reply. That makes sense; using the Database for dynamic data and xml, json for static data. Should have thought a little longer about it. I am sure though we want to store very crucial static data as variables in a .php-file so it wont be spit out to the browser.

Reply With Quote
  #4  
Old February 21st, 2013, 07:53 PM
lmbarns lmbarns is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 1 lmbarns User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 48 sec
Reputation Power: 0
I'm using xml in a mobile game because when I was using php+mysql on my tablet, when the internet was finicky, it made it unplayable. It's just a single player game so if someone takes the time to edit it on their phone so be it. I was considering adding a manual save button that would upload the attributes in the file to mysql.

Reply With Quote
  #5  
Old March 14th, 2013, 04:25 AM
peter_solutions peter_solutions is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2013
Posts: 2 peter_solutions Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 53 m 10 sec
Reputation Power: 0
xml is recommended
Comments on this post
ManiacDan disagrees!

Reply With Quote
  #6  
Old March 14th, 2013, 02:26 PM
medialint's Avatar
medialint medialint is offline
Type Cast Exception
Dev Shed God 20th Plane (14500 - 14999 posts)
 
Join Date: Apr 2004
Location: OAKLAND CA | Adam's Point (Fairyland)
Posts: 14,938 medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)medialint User rank is General 112nd Grade (Above 100000 Reputation Level)  Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1Folding Points: 319635 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 6 Months 2 Weeks 2 Days 13 m 33 sec
Reputation Power: 8490
Facebook
Quote:
Originally Posted by peter_solutions
xml is recommended


Who cares about Higgs boson, we've found the fifth Trident dentist!
__________________
medialint.com

“Today you are You, that is truer than true. There is no one alive who is Youer than You.” - Dr. Seuss

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDev Shed Lounge > XML vs Database

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap