Using XML can also make sense for smaller projects where a 'real' DB just
isn´t available on the server.

I am developing a CMS for our student magazine. Over the last 16 months or
so, we used CGI /Perl for processing and stored the data in plain text
files.In these article files, I would use pseudo-tags like, __PICTURE_1__,
then get some data for this picture (URL, width & height, ALT-Text, longer
description, source & copyright) from a *seperate* text file, then create an
HTML table that contains the picture & a description and insert it into the
article.
This was way better than using static HTML, which we had used in the
beginning (wanne here a definition for *pain*? ;-). But it still didn´t
really seperate layout and content since basic HTML tags like <H1>, <BR>,
<B>, <I> etc. were used in the text files. This worked fine as long as we
were glad that minor changes in the footer of the page didn´t involve 48
hours of non-stop work, but it became unfeasible when our ambitions grew and
extended to having a (differently formatted) print version of each
article....

The bottom line is: With XML, we now have a clear-cut DTD and thorough
seperation of code, content, and layout -- exactly what one would want to
achieve with a DB. The performance is ok, I´d say better than with the old
Perl script :) and will improve even further when we implement caching of
the HTML output (yes, I know, that´s not an option for everyone).

For us, XML is kinda a third way aside from SQL and plain text files.
Besides, we still have the option to set up a DB and create the XML files
automatically & cache the output if we ever grow big and important enough to
afford web hosting with a real DB :)

Unless you´re data are updated too frequently (and are needed to be
up-to-date immediately) to be cached, take a look at XML. Besides, once you
CAN exchange your stuff with others, you might come across new ideas to
improve your whole site!

Regards,

Adrian Slusarczyk


"Simon Taylor" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
414B25821CCAD61181A90048543C810C03EDB4@EMAILSERVER">news:414B25821CCAD61181A90048543C810C03EDB4@EMAILSERVER...
Sure in this context I agree with you, but how often do you have a website
which needs to publish in many different formats? I have designed and built
websites for a while and have never come across such an application.
But if I were ever I would definitely invest the effort that is required,
but until then I will save myself from the extra work.
Cheers
Simon

-----Original Message-----
From: José León Serna [mailto:[EMAIL PROTECTED]]
Sent: 16 October 2002 10:40
To: Joshua Alexander
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Re: PHP & XML


El mié, 16-10-2002 a las 10:22, Joshua Alexander escribió:
> I have to agree with Simon. I am at a loss when it comes to seeing
> any benefit to XML that doesn't involve data exchange between at
> least two parties.
>
> I've spent the last two years building database-backed websites, so
> I'm constantly trying to improve how I build them in order to make
> design and maintenance easier... I used to rely heavily on SSI for
> this, and now I rely more on PHP... if XML would make things easier,
> believe me, I would LOVE to know how... but I just don't see it.
Let's imagine you create a website of an online magazine, this magazine
publishes in HTML, PDF, TXT, PS, etc, etc, etc. How would you do it?

I would use XML to write the articles and then stylesheets to transform the
articles to the formats I want. Write once, publish anywhare ;-)

Regards
--
XPde :: XP-like desktop environment (developed with Kylix ;-)
http://www.xpde.com





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to