perl and web development

perl and web development

am 01.02.2005 10:19:23 von Deke

Any help on the following subjects will be much appreciated:

1. Is perl a better option than PHP for web development. Why?
2. Do many hosting sites support perl?
3. Is perl faster than PHP in most instances?
4. Considerng that Zend purposely cripples php speed so that they can
sell/promote their performance products and perl is truly open, will
perl run at its maximum - especially with a compiler in perl 6?

6. Is compiled perl 6 code compatible with mod_perl and mason?

Thanks!

Re: perl and web development

am 01.02.2005 11:55:23 von Sherm Pendley

Deke wrote:

> 1. Is perl a better option than PHP for web development. Why?

There is no "One True Language" that is better for all things. What's better
for Site A may not be better for Site B. It depends on your skill with
various technologies, your hosting environment, and a variety of other
factors.

> 2. Do many hosting sites support perl?

Most of them support it to varying degrees. Basic CGI support is cheap and
easy to find; mod_perl support less so.

> 3. Is perl faster than PHP in most instances?

It depends. In general, an server-embedded interpreter (either Perl or PHP)
will perform better than a child process (either Perl or PHP). This is one
major reason why the answer to 1 is "it depends" - if your hosting company
only supports one or the other as an embedded module, that's a major plus
for the language that can be embedded.

> 4. Considerng that Zend purposely cripples php speed so that they can
> sell/promote their performance products

Prove it.

> perl run at its maximum - especially with a compiler in perl 6?

The compiler will do less than you think it will. It will compile to byte
codes - which Perl 5 already does. The difference is, 6 will offer the
ability to save compiled byte codes to disk, whereas Perl 5 has to compile
your script each time it starts up.

For small scripts that take negligible time to compile anyway, you won't
notice a difference between compiling at startup and loading pre-compiled
byte codes. For huge scripts, you'll probably see an improvement in startup
time, but no difference in execution speed.

> 6. Is compiled perl 6 code compatible with mod_perl and mason?

I'd that it will be, when Perl 6 is finished and released. That's still
pretty far off though.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org

Re: perl and web development

am 01.02.2005 11:55:23 von Sherm Pendley

Deke wrote:

> 1. Is perl a better option than PHP for web development. Why?

There is no "One True Language" that is better for all things. What's better
for Site A may not be better for Site B. It depends on your skill with
various technologies, your hosting environment, and a variety of other
factors.

> 2. Do many hosting sites support perl?

Most of them support it to varying degrees. Basic CGI support is cheap and
easy to find; mod_perl support less so.

> 3. Is perl faster than PHP in most instances?

It depends. In general, an server-embedded interpreter (either Perl or PHP)
will perform better than a child process (either Perl or PHP). This is one
major reason why the answer to 1 is "it depends" - if your hosting company
only supports one or the other as an embedded module, that's a major plus
for the language that can be embedded.

> 4. Considerng that Zend purposely cripples php speed so that they can
> sell/promote their performance products

Prove it.

> perl run at its maximum - especially with a compiler in perl 6?

The compiler will do less than you think it will. It will compile to byte
codes - which Perl 5 already does. The difference is, 6 will offer the
ability to save compiled byte codes to disk, whereas Perl 5 has to compile
your script each time it starts up.

For small scripts that take negligible time to compile anyway, you won't
notice a difference between compiling at startup and loading pre-compiled
byte codes. For huge scripts, you'll probably see an improvement in startup
time, but no difference in execution speed.

> 6. Is compiled perl 6 code compatible with mod_perl and mason?

I'd that it will be, when Perl 6 is finished and released. That's still
pretty far off though.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org

Re: perl and web development

am 01.02.2005 11:55:23 von Sherm Pendley

Deke wrote:

> 1. Is perl a better option than PHP for web development. Why?

There is no "One True Language" that is better for all things. What's better
for Site A may not be better for Site B. It depends on your skill with
various technologies, your hosting environment, and a variety of other
factors.

> 2. Do many hosting sites support perl?

Most of them support it to varying degrees. Basic CGI support is cheap and
easy to find; mod_perl support less so.

> 3. Is perl faster than PHP in most instances?

It depends. In general, an server-embedded interpreter (either Perl or PHP)
will perform better than a child process (either Perl or PHP). This is one
major reason why the answer to 1 is "it depends" - if your hosting company
only supports one or the other as an embedded module, that's a major plus
for the language that can be embedded.

> 4. Considerng that Zend purposely cripples php speed so that they can
> sell/promote their performance products

Prove it.

> perl run at its maximum - especially with a compiler in perl 6?

The compiler will do less than you think it will. It will compile to byte
codes - which Perl 5 already does. The difference is, 6 will offer the
ability to save compiled byte codes to disk, whereas Perl 5 has to compile
your script each time it starts up.

For small scripts that take negligible time to compile anyway, you won't
notice a difference between compiling at startup and loading pre-compiled
byte codes. For huge scripts, you'll probably see an improvement in startup
time, but no difference in execution speed.

> 6. Is compiled perl 6 code compatible with mod_perl and mason?

I'd that it will be, when Perl 6 is finished and released. That's still
pretty far off though.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org

Re: perl and web development

am 01.02.2005 12:41:01 von Thomas Wittek

> 1. Is perl a better option than PHP for web development. Why?

IMHO CPAN is _the_ argument for Perl. Additionally Perl has a broader
scope, PHP is generally web-focussed. When only developing websites, PHP
may be easier, but if you learn Perl you can also use your knowledge for
various other solutions. Also Perl would be the language of choice for
integration in existing systems as it has interfaces to almost anything
you can imagine in the IT world.
A big argument for PHP in version 5 would be the redesigned OO concept,
which is still a bit rudimentary (missing private modificators etc.)
Perl5, but will be completely redesigned in Perl6.

> 2. Do many hosting sites support perl?
> 3. Is perl faster than PHP in most instances?
> 4. Considerng that Zend purposely cripples php speed so that they can
> sell/promote their performance products and perl is truly open, will
> perl run at its maximum - especially with a compiler in perl 6?

Most hosters I know support PHP and Perl-CGI. So writing mod_perl
modules won't work in most cases. But internally many hosters use
mod_perl/FastCGI/... as they would waste performance not doing so. So
even your CGI-Scripts should perform well, although the CGI-approach
isn't very beautiful, because most people put the HTML into the
CGI-code. Neither is the PHP-approach beautiful as most people put the
PHP-Code into the HTML. Generally you should separate the view (HTML)
from the code (Perl/PHP) e.g. by using templates. This is an language
independent issue.
I'm degressing from the topic... :)

> 6. Is compiled perl 6 code compatible with mod_perl and mason?

I think there will be new mod_perl/mason versions supporting Perl6.
Currently there already exists a mod_parrot (Perl6's compiled bytecode).
But you don't want to use it, as it is programmed in some kind of
assembly language. Of course you will be able to run compiled Perl6
scripts on mod_parrot, but currently everything about Perl6 is still
very experimental.

-Thomas

Re: perl and web development

am 01.02.2005 16:19:11 von jurgenex

Deke wrote:
> Any help on the following subjects will be much appreciated:
>
> 1. Is perl a better option than PHP for web development. Why?

Is a screw driver or a hammer a better tool for home improvement? Why?

> 3. Is perl faster than PHP in most instances?

Is a screw driver or a hammer faster in most instances?

jue

Re: perl and web development

am 01.02.2005 16:19:11 von jurgenex

Deke wrote:
> Any help on the following subjects will be much appreciated:
>
> 1. Is perl a better option than PHP for web development. Why?

Is a screw driver or a hammer a better tool for home improvement? Why?

> 3. Is perl faster than PHP in most instances?

Is a screw driver or a hammer faster in most instances?

jue

Re: perl and web development

am 01.02.2005 16:19:11 von jurgenex

Deke wrote:
> Any help on the following subjects will be much appreciated:
>
> 1. Is perl a better option than PHP for web development. Why?

Is a screw driver or a hammer a better tool for home improvement? Why?

> 3. Is perl faster than PHP in most instances?

Is a screw driver or a hammer faster in most instances?

jue

Re: perl and web development

am 01.02.2005 16:41:34 von flavell

On Tue, 1 Feb 2005, Jürgen Exner wrote:

> Is a screw driver or a hammer faster in most instances?

Prompts the question which one stands for Perl, and which for PHP

SCNR

Re: perl and web development

am 01.02.2005 16:41:34 von flavell

On Tue, 1 Feb 2005, Jürgen Exner wrote:

> Is a screw driver or a hammer faster in most instances?

Prompts the question which one stands for Perl, and which for PHP

SCNR

Re: perl and web development

am 01.02.2005 16:41:34 von flavell

On Tue, 1 Feb 2005, Jürgen Exner wrote:

> Is a screw driver or a hammer faster in most instances?

Prompts the question which one stands for Perl, and which for PHP

SCNR

Re: perl and web development

am 02.02.2005 07:58:31 von Tintin

"Alan J. Flavell" wrote in message
news:Pine.LNX.4.61.0502011540220.4966@ppepc56.ph.gla.ac.uk.. .
> On Tue, 1 Feb 2005, Jürgen Exner wrote:
>
>> Is a screw driver or a hammer faster in most instances?
>
> Prompts the question which one stands for Perl, and which for PHP

Neither.

Perl is the Swiss army knife and PHP is the mallet.