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


in reply to CGI and mod_perl vs PHP vs ruby on rails

There is no comparison between Perl and PHP.

Perl is a general purpose computer language whereas PHP only works (and badly in my opinion) within the realm of dynamic web-site programming.

I have never used Ruby, so I cannot comment, but here is short comparison between Perl and Ruby.

I have been told that Catalyst is inspired by Ruby on Rails, but is (of course) much better!

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

  • Comment on Re: CGI and mod_perl vs PHP vs ruby on rails

Replies are listed 'Best First'.
Re^2: CGI and mod_perl vs PHP vs ruby on rails
by cdarke (Prior) on Nov 04, 2008 at 09:21 UTC
    PHP only works (and badly in my opinion) within the realm of dynamic web-site programming.

    While I would not disagree with the sentiment, in the interests of accuracy it should be pointed out that PHP scripts can be run on the command line. You still have to wrap the stupid <?PHP ... ?> tags around the code, but aside from that it will run given #!, permissions, PATH, etc. Its a bit of a pig to do that on Windows, but even that is possible.
    It is true to say that PHP is rairly used anyware except on the web. The people who use PHP rather let it down as well - poor coding practice is rife.

    It might be worth pointing out that Perl on Rails being done by the Beeb href http://www.bbc.co.uk/blogs/radiolabs/2007/11/perl_on_rails.shtml
      Sorry but AFAIK Perl on Rails is vaporware. The main reason why the announcements got such a big audience are IMHO depictions of the pathetic development environment at the BBC.

      But did anyone ever see any code?

      Catalyst is IMHO very TIMTOWTDI flexible (e.g. allowing integration of all main CPAN templating systems) but heavy and requesting much knowledge and planing.

      If you are looking for a more Rails like monolithical approach in Perl you may want to have a look at Jifty or Mojo.

        There is code. It's used on BBC Programmes.

        I think they open sourced it, but it's only released as a tarball, and I can't find it at the moment.

        Code-wise it's a bit of a stretch to say it's Ruby on Rails in Perl. It was written by programmers who use and like (and I think pefer) Ruby and RoR, who had to use a very limited Perl environment. As such it's very much inspired by RoR but it's lacking a lot of features (no ActiveRecord for example).

        /J

Re^2: CGI and mod_perl vs PHP vs ruby on rails
by ikegami (Patriarch) on Nov 04, 2008 at 12:06 UTC

    The OP is asking specifically about the realm of dynamic web-site programming, so I'd say your first comment doesn't apply.

      And that is exactly why I made the point that Perl is much more than some sort of templating system for the web. We should not be pulled down to the level of what PHP does.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James