RE: [PHP] Re: PHP & XML
| From: | Alexandru COSTIN | Date: | Fri, 18 Oct 2002 08:53:29 +0000 |
| Subject: | RE: [PHP] Re: PHP & XML | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-120476@lists.php.net to get a copy of this message | ||
Hello,
> I still wouldn't use XML for this. I mean, all the articles are in
> the database, and I'm already using PHP to pull them out and format
> them into html, right? I can just as easily use PHP to put them into
> all those other formats.
>
> So again, why waste time with XML unless I need to feed these
> articles to others, like in a newsfeed situation?
And if you have the same application logic for both formats, a
nd you discover a bug in it (or decide to change the order of the records)
, what would you do? mirror the same implementation in n places.
I was also a big anti XML fan (we have a lot of products for Dream
weaver MX, and they allow us to do web RAD in a very intuitive way), until w
e have discovered how easy was to work with cocoon2 (we have started workin
g on a contract for a foreign partner that imposed cocoon2). After w
e have discovered it, we have falled in love with and created Krysalis as
a PHP implementation of the framework. From that initial implementation, w
e have advanced to a very powerful platform that is completely independen
t from the Java version, and which also allows you to create web services
and to publish content in a very flexible way.
Without a big performance penalty, as we compile everything in
pure, optimized PHP, and we also have multiple caching mechanisms to serve
pages faster.
So, whether if you need only one output format, you might consid
er the XML/XSL approach interesting, as it's much more maintanable and e
asy to understand.
Alexandru
>
>>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.
>
>>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 ;-)