This is a discussion on Re: discussion forum design within the PHP Language forums, part of the PHP Programming Forums category; I cannot see why it is necessary to use XML. The template class in PHPLib is good enough to seperate ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I cannot see why it is necessary to use XML. The template class in
PHPLib is good enough to seperate program from webpage design. Prodoc wrote: > I'm going to create a php/mysql database driven xml/xslt (server side) > based discussion forum but before I start programming I would like to > know what your view on the following design matter is. > > This is just the rough sketch of the complete idea, I want to improve my > existing php/mysql based forum which I created because it contains some > serious code design flaws. That's why I decided I might as well go to an > xml/xslt solution while I'm at it anyway. > > Personally I think it should just go 3 levels deep (like the current > forum): > - Main (with display of last post info, mod's, etc.) > - Subs (with display of last post info, etc.) > - Threads (with display of starter info, nr. of responses, most recent > reply, etc.) > - Posts (with display of post user info, message, options, etc.) > > I want to offer the ability for users select the following display modes > (which the current forum doesn't have at all): > > First page: > - Show only Main categories (clicking on a main category brings them to > the second page) > - Show Main categories with underlying Sub categories (with clicking on > a sub category brings them to the third page containing the theads) > - ...eh, why not... Show Main categories with underlying Sub categories > and underlying Threads > > Same goes for the second page: > - Show only Sub categories > - Show Sub categories with underlying Threads > > Now, the way I look at it I can create the xml file from the database > three different ways: > - Create an xml file with only the data needed for display depending on > the selected display mode > - Create one and the same xml file containing ALL the data > (Main-Subs-Threads) no mather what display mode selected throughout the > forum > - Create an xml file with containing only the data need for the current > level and underlying level(s) no mather what display mode selected > throughout the forum > > Because the xml part is only being done server side it doesn't realy > matter for the client side what way I create the xml file. For each > display mode a different xslt file will be used to transform the whole > lot to xhtml. > Creating one xml containing ALL the data throughout the forum makes the > php coding easier though I'm not sure what the con's will be for the > server load. > > What is your view or experience on this? > Am I overlooking something? > > Prodoc > |
|
|||
|
hj wrote:
> I cannot see why it is necessary to use XML. The template class in > PHPLib is good enough to seperate program from webpage design. > I am not familiar "The template class in PHPLib" would you care to enlighten me on this one? What is PHPLib and what does the template class have to offer me? There are several reasons why I want to use XML. I want to make the forum as flexible as possible, not only being able to display it the normal way a forum should look but also to be able to offer serveral (future) alternatives by changing just the xslt file without having to touch the core code. e.g. showing just small snippets of recent posts on the mainpage of the website, changing the layout to usable mobile phone content, etc. Also a reason is because of the "technology" itself, attending a multimedia education at Uni challenges me to investigate the options available. Prodoc |
|
|||
|
Prodoc wrote:
> hj wrote: > >> I cannot see why it is necessary to use XML. The template class in >> PHPLib is good enough to seperate program from webpage design. >> > > I am not familiar "The template class in PHPLib" would you care to > enlighten me on this one? What is PHPLib and what does the template > class have to offer me? > > There are several reasons why I want to use XML. I want to make the > forum as flexible as possible, not only being able to display it the > normal way a forum should look but also to be able to offer serveral > (future) alternatives by changing just the xslt file without having to > touch the core code. e.g. showing just small snippets of recent posts on > the mainpage of the website, changing the layout to usable mobile phone > content, etc. > Also a reason is because of the "technology" itself, attending a > multimedia education at Uni challenges me to investigate the options > available. > > Prodoc > PHPLib is the "PHP Base Library". It's website is at http://phplib.sourceforge.net. It includes some very handy classes for session management, templates, user, authentication, and permission management. I think XML is best for information exchange. But as far as a forum is concerned, you just want to have everything nicely displayed on the web, and from a programmer's view you want to seperate the logic from the page design, so the template in PHPLib is sufficient. Check it out before you go. Hope this helps. |