> -----Original Message-----
> From: Mithun Bhattacharya [mailto:inzoik@;yahoo.com] 
> Sent: 30 October 2002 09:17
> To: [EMAIL PROTECTED]
> Subject: Re: Yahoo is moving to PHP ??
> 
> 
> No it is not being removed but this could have been a very big thing
> for mod_perl. Can someone find out more details as to why PHP was
> preferred over mod_perl it cant be just on a whim. I might be biased
> but considering the fact that PHP and mod_perl were neck to neck the
> cons should have made up for any slipup in performance.

err did you look at the same slides as me? 

in all performance tests, YSP(perl) performed better than PHP, with 
the exception of memory usage.

and there is a slide explaining why not Perl - the main objection 
seemed to be:
<QUOTE>
"There's More Than One Way To Do It
   so many different Perl styles
   everyone's code looks different
   problematic for development when many people working on 
   single codebase"
</QUOTE>

While there were Pros/Cons for Perl and the other rejectees, there were 
no Pros/Cons for PHP unless you count the gotchas mentioned after four
months of using PHP:

<QUOTE>
Shallow learning curve
 - very easy to get some pages up quickly
But mixed app/presentation problematic
 - PHP code and HTML forever intertwined
 - coding conventions help
*.inc for function and class libraries
*.php for web pages (call functions, echo $vars)
 - use Smarty to enforce separation?

"The drawback of using a code in template system, is that your code and
HTML output quickly become forever intertwined. This makes changing the
appearance of your pages difficult. For example, if you check the user
cookie and load user database data in the "common-header" moving around
where you include this template will change where you retrieve the
database information for the user, possibly breaking other parts of the
page which rely on that data. "
  http://www.clearsilver.net/docs/apples_to_oranges.hdf  
 

The "implement twice" problem
 - much offline processing done in Perl
 - example: tax/shipping calculation for Shopping
PEAR != CPAN
 - installer doesn't work in PHP 4.2.x
 - repository smaller, less mature than CPAN
Surprises for people used to coding Perl

</QUOTE>

Interestingly our experience was/is similar - we chose PHP 2.5 years ago
for the development of our dynamic ASP interactive pages, and Perl for
all our data-processing and server management etc. Hindsight shows us
that it was the right decision at the time - we gained an 18 month lead
on the competition.

After 2.5 years, the 'have to write everything twice' problem has lead
us to plan a gradual migration from PHP to Perl. All our new pages and
products are being developed in mod_perl. I wonder if they will consider
a similar change? Unlikely give the number of developers and the
disruption?

There is one con for PHP that I disagree with - you don't have to mix
your HTML and application logic - just as in Perl, you can separate them
if you want to - we work extensively in PHP ordered hashes and isolate
the formatting and HTML generation in a few included utility
collections, making it easy to change the HTML we generate without
changing any of the underlying business information.

Regards
Jeff



Reply via email to