Log in

View Full Version : XML for CMS?



NickNameDrive
10-12-2010, 03:12 PM
In short, any good reason not to use XML as a database for CMS?

traq
10-12-2010, 07:53 PM
MUCH slower to search, and more complex coding.

XML is best for hierarchical data that does not typically change after being saved.

a DB is better when info will be read, searched, modified, etc. on a regular basis (as it will be in a CMS).

djr33
10-12-2010, 10:08 PM
With XML, you must load all of the data every time. With a database, you can pick certain parts to load. This makes searching, cross-referencing and many other operations more efficient with a database.

If your CMS is only loading entire pages and not doing much with the data, XML will be fine. If you want any more complex operations, a database will be better.

XML is better as a storage (archive) format, but not as an active format for a frequently used page where there are complex operations.

NickNameDrive
10-13-2010, 10:30 AM
yes, that's pretty much what i've heard.

How about small website with up to 50 articles (each 2 A4 pages top, 12px), no shops, just reading and checking photos, some basic JSs on Jquery. Would XML supply?

Asking because i think i can try and do my custom CMS, but in XML though.

djr33
10-13-2010, 04:32 PM
The size of the website isn't relevant. Just the way that each page processes.

Assuming that every page is stored in a separate XML file, then the only question is how much extra processing is required after you load the data from the file.

If you want to store everything in one place (all pages), then you absolutely want to use a database. But you could use separate XML files per page and it would probably work out.