[sclug] PHP Question

Neil Haughton n.a.haughton at bigfoot.com
Thu Aug 12 18:55:56 UTC 2004


PMFBI,  but  this looks like the sort of thing my colleagues do every 
day, and they wouldn't dream us employing XML unless they had to 
transport the data from A to B though a firewall, and certainly not in 
between a database and a web application (again, unless a firewall came 
between the two which isn't likely).

I agree with Will - serverside PHP accessing the database directly 
producing HTML output would be best, but if you have to use XML between 
the database and web-server, use XSLT on the server side, not client 
side. That way you can make your web app browser neutral with least effort.

regards,

Neil Haughton

>
> ------------------------------------------------------------------------
>
> Subject:
> Re: [sclug] PHP Question
> From:
> Will Dickson <wrd at glaurung.demon.co.uk>
> Date:
> Thu, 12 Aug 2004 11:56:39 +0100
> To:
> sclug at sclug.org.uk
>
> To:
> sclug at sclug.org.uk
>
>
> tim wrote:
>
>>
>> Hi all
>> I have a quick question about so architecture.
>> I am writing some software for a hotel. It will be in PHP because I 
>> want to learn it. What I would liketo do is have PHP access a MYsql 
>> db and create XML that will be sent via HTTP to the browser where I 
>> will use XSLT to format it. I have done something similar previously 
>> using Perlscript and M$ XMLHTTP and Microsoft.XMLDOM. Obviously I 
>> want to be as browser independant as possible and the XMLHTTP 
>> solution has a prerequisite of IE6.
>
>
> Assuming that you don't want to contribute to M$'s attempts to 
> monopolise the web, you would be much better off doing the transform 
> server-side and sending ordinary (X)HTML to the browser. (FWIW this is 
> exactly what our software does.) Trying to do anything clever will 
> give you so many compatibility problems it really won't be worth it.
>
> You should also be aware that MS's implementations of XSLT are 
> variants which are incompatible with the W3C standard, and vary with 
> IE version. That which works in IE6 may not work in IE5 and 
> vice-versa, and probably won't work with a standards-compliant 
> implementation either.
>
> Alternatively, IIRC PHP is more-or-less designed to allow you to 
> populate HTML directly from the DB. Apart from the amusement value, 
> what do you gain from going via XML?
>
>
> Regards
>
>
> Will.
>
> ------------------------------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.tmdg.co.uk/pipermail/sclug/attachments/20040812/b6bfbfcf/attachment.htm


More information about the Sclug mailing list