http://www.perlmonks.org?node_id=209054


in reply to Re: PHP (and Perl) at Yahoo!
in thread PHP (and Perl) at Yahoo!

I am programming PHP for a living and it is a bit strange that everyone points out that PHP mixes HTML with code and that is a bad thing. Me personally never mixes code and HTML. There are template engines to do the code separation (Smarty comes to my mind, and a Lithuanian phemplate engine). So mixing PHP and HTML rarely happens, especially when you do big websites in OO style (PHP OO support is still very limited though)

Replies are listed 'Best First'.
Re: Re: Re: PHP (and Perl) at Yahoo!
by grantm (Parson) on Oct 30, 2002 at 19:48 UTC

    I agree one hundred percent that abstracting your code out into OO modules with templates to render the HTML is the most sensible way to manage code for big web projects - but if you're going to do that, why use PHP? That's a serious question - I don't understand why someone would want to turn their back on the wealth of pre-written code in CPAN in order to use a language which was 'designed for the web' only to use that language in the exact same way they would have used Perl. In Yahoo's case, the decision is even more impenetrable since they already have a large investment in Perl code.