iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > PHP

Reply
 
LinkBack Thread Tools
Old July 25th, 2008, 10:09 AM   #1
New Member
 

Join Date: Jun 2007
Location: Canada
Age: 2
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 cbisson is on a distinguished road
XML Structure

Hello everyone,

I've been working with PHP and mySQL for years, and now, I'm about to start a CMS project using a lot of XML.

Since it is a big projecct, I do not want to blindly start programming, gotta plan ahead right?

So I've been questionning myself on what is the best way to manage the XML files to make it optimized and easy to use.

First, is it better to use many small files, or fewer but larger files?

Second, is it better to split as much information as possible. For exemple, I'd have an XML file for my menu sections and attributes, another XML for the content, and read the right XML file when I need it. Or is it better to regroup both into one bigger XML file?

Third, let's say I have a lot of HTML content blocs, which are connected to sections for display. Is it better to put that content inside XML files, and parse them? Or would it be a good idea to simply put the content inside simple HTML files which I "require" using PHP to display it.

Last, is it a good idea to put everything inside XML files leaving the database free of many reading queries? Or is it at some point better to mix reading from the XML files and the database?

I know there must be many different opinions on different solutions, but having the opinion of people used to working with XML would give me a good starting point )

Thank you for your help!

Chris
cbisson is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 28th, 2008, 06:02 PM   #2
Aso
Most Reputable Member
 

Join Date: Oct 2007
Location: UK
Posts: 1,633
Blog Entries: 2
Thanks: 22
Thanked 84 Times in 79 Posts
Rep Altering Power: 0 Aso is on a distinguished road
Re: XML Structure

First off, I'll admit I haven't yet started working with XML

However, I have been reading up on it quite considerably (in particular, using OO PHP and it's sexy DOM capabilities) and have come away with mixed opinions.

If you're going to be frequently opening and closing XML files (and parsing them too of course!) then the speed of your application might become significantly slower the greater the file size (unless your streaming the XML, the data is loaded into memory).

So if you decide to break them up, your next hurdle will be trying to efficiently manage data in more than one place.

However, don't let that you put you off. XML seems like it can be used to great effect, and since I'm no expert in the field, take these words with a pinch of salt!

Some excellent resources I've been reading;
Aso is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
database , developpement , html , parsing , php , practice , xml


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Website Structure marSoul How is this done? 4 October 11th, 2007 04:31 PM
Frame structure WLQ JavaScript 1 October 8th, 2007 06:56 AM
blog structure alexgeek PHP 25 August 25th, 2007 10:23 PM


Search Engine Optimization by vBSEO 3.2.0 RC8