Foggy Bottoms has asked for the wisdom of the Perl Monks concerning the following question:

Dearest monks,

A couple of friends and I are about to develop a website for a French non-profit organization and we're arguing about which language to use.
Here are our language options : The latter is preferred so far due to its OOP structure, and Python is second favorite as it seems to be rather common in the Linux world (I'm a Windows dude, I wouldn't know)

I personally believe Perl is a good option as it has a big community online, this forum, ppm to add packages...

I'd like to know what is the share of perl in web programming versus the other two (plus PHP we set aside as not powerful enough). I'd like to know what would make Perl a language better than the other two.

Could anyone please help me out ?

Replies are listed 'Best First'.
Re: Is Perl the most adequate language ?
by BrowserUk (Pope) on Oct 17, 2003 at 12:35 UTC

    All the languages are more than capable for your purpose. Perl's big advantage is CPAN, most everything you would ever want to do (plus quite a lot that you won't) is there, easily available and free. The other languages aren't quite so well-endowed.

    Beyond the presonal preference stakes between, a BDSM language like Python, a "Here's the rope. Pull" language like Perl, and a very clean, orthoganal, very-OO, if somewhat slower language like Ruby, then possible deciding factors might be:

    • Which language do you and the other partisipants know best?
    • How complex a site are you putting together. If you can find what you need amongst the other languages repositories, Python's PyPI with 300+ packages or Runy's RAA with it's 1000+ packages, then that could be a deciding factor.

      CPAN has several thousand individual packages, possibly an order of magntude more than either of the others, and probably several alternatives for any use that you might think of, but that in itself isn't necessarily a complete recommendation.

      The problem comes not only from finding the module(s) that do what you want and deciding which is best for your purpose, but also from working out which ones are robust, efficient, well-documented, well-supported and well-designed for their purpose.

    Were I currently in the position of taking on the task you have, I think that I would start by coming up with a paper design for the website. A set of storyboards or use cases or whatever your preferred mthod would be. From that I would hope to get a feel for the complexity and nature of the task.

    1. Will it be mostly static or mostly dynamic pages.
    2. Will the number of the pages tend to grow slowly or rapidly.
    3. What sort of hit rates am I expecting?
    4. Will a single server site be sufficient for the forseable future or do I antisipate having to move to a load-balanced environment?
    5. What would be the consequenses of of the site being off-air due to break-downs?
    6. Is security a major issue?
    7. Is a the use of a database an necessary or desirable criteria of the site?

    I think that only once you can answer these questions, and no doubt many of the more web-experienced monks will extend this list considerably, will you be in a position to know exactly what the task is you are facing and therefore what external modules (or even whole application frameworks) would be useful to you.

    Only then will your decision be able to based on more than personal preferences for one style of programming (language) over another.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    Hooray!

      I could only agree with you.

      Of course, it depends on what you want. I would not create CBT (Computer Based Training) with Perl, for that I would use TenCORE.

      But for system management I've used and I will again use Perl. And for database management. And for interactive webpages. Etc. I don't like Javascript or PHP, just a feeling, just the looks of them. And Java is of course butt ugly. Maybe I would do some C for specific speed related tasks, but that language would take me a while to pick up on again.

      Therefore: Perl.

        Congrats! You are the lucky winner of our 300,000 new node prize!

        You win a free copy of perl (<smallest> downloadable at your own expense from your nearest CPAN repository </smallest>).


        Examine what is said, not who speaks.
        "Efficiency is intelligent laziness." -David Dunham
        "Think for yourself!" - Abigail
        Hooray!

Re: Is Perl the most adequate language ?
by moxliukas (Curate) on Oct 17, 2003 at 11:49 UTC

    The language does not matter. You are saying that the programmers will be you and your friends, so use a language that you all know and feel confident in. PHP might be a very good language for websites but that doesn't help if you are a Perl guru and know absolutely nothing about PHP.

    I also think that the answers you are going to get here will be pretty biased, as this is Perl website after all. Unless you ask the same question in Python, Ruby and PHP forums, you won't get the whole picture (and still... I somehow think that Python people are far more zealous about their language than anyone else)

    My personal opinion (which is of course, biased) would be that PHP is an ideal solution for a small website. If you think big, then Perl would be my answer. But probably just because I know it more than any other language you mentioned.

Re: Is Perl the most adequate language ?
by Arunbear (Prior) on Oct 17, 2003 at 11:59 UTC
    Perl is not as pretty as Python and Ruby, but at this moment in time IS the the most adequate language for web programming because of the sheer quantity (and maturity) of available web tools.

    If you don't use Perl you will be depriving yourself of such wonders of the world as Template toolkit , Mason, mod_perl and a host of others.

    Bottom line - use Perl because if you do you'll find most of the hard work has already been done for you.
Re: Is Perl the most adequate language ?
by Abigail-II (Bishop) on Oct 17, 2003 at 12:49 UTC
    The best language is whatever language the people developing the software in are going to be most comfortable with. From what you describe, the preference is 1) Ruby, 2) Python, 3) Perl. Therefore Ruby is the best language to do it in, then Python, and finally Perl.

    All of the three languages are capable of making websites with, and all have tools to help you out, so that's not a deciding issue. Apparently, your groups finds an OO structure important, so you should choice a language that gives you such an OO structure. If that happens to be Ruby, Ruby is the winner.

    Abigail

Re: Is Perl the most adequate language ?
by nimdokk (Vicar) on Oct 17, 2003 at 12:24 UTC
    My suggestion would be to simply sit down and list out the pro's and con's for each option and see which one best suits what you will ultimately need and which has the most benefits both early on as well as later. My thought would be to keep an eye towards maintainability and ease of use later on down the road. Basically, try to use the right tool for the right job.

    That probably does not help much but it might be one thing to consider. You might also consider if you are going to be using different platforms (i.e. *nix and Windows) to do your development and running the website. In which case Perl is a good option (in my opinion since I don't know about Windows support for Ruby or Python).


    "Ex libris un peut de tout"
Re: Is Perl the most adequate language ?
by perrin (Chancellor) on Oct 17, 2003 at 15:50 UTC
    This would make a great t-shirt:

    Perl: The Most Adequate Language

      Or, the PC variant:

      Perl: The Most Sufficiently Adequate Language

      ------
      We are the carpenters and bricklayers of the Information Age.

      The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

      ... strings and arrays will suffice. As they are easily available as native data types in any sane language, ... - blokhead, speaking on evolutionary algorithms

      Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Re: Is Perl the most adequate language ?
by derby (Abbot) on Oct 17, 2003 at 12:40 UTC
    Is Perl the most adequate language? Most adequate? Don't know but it is more than adequate.

    -derby

      Perl is awesome for web programming. But if your experience with Perl, Python, Ruby and PHP is limited, I believe it is short sighted to quickly strike PHP from the list. The web is full of good things written in PHP, and PHP can be very simple for web programming. I suspect you could get more done in Perl once you learned it. I also suspect you would be up and running with a much easier learning curve in PHP.

      If it were my choice, I'd be less concerned with whether the language is OO. I'd be far more concerned with the already written Web Applications and Libraries available so I spent time writing content for the web and less time reinventing the wheel.

      Do not evaluate Perl without going and taking a serious look at all the free modules on CPAN.org for Perl

      I would be making stuff up if I evaluated Python or Ruby.
Re: Is Perl the most adequate language ?
by hardburn (Abbot) on Oct 17, 2003 at 13:45 UTC

    If you're running this on Apache, it gives you the option of running mod_perl. This gives you the benifit of having an interpreter built into the server, thus getting an enormous speed increase. AFAIK, neither Python or Ruby have such an advantage. PHP also has a built-in interpreter (mod_php), but mod_perl also offers hooks into the Apache API, so you can do things at a much lower level than any other language would offer, save C. In Apache2, you can even write handlers in Perl for protocols other than HTTP.

    Not to be forgotten is Perl's trump card: CPAN. There are various projects for other languages to do the same thing, but they will take years to offer a fraction of the functionality already on CPAN.

    Do remember when reading the posts here that this is a Perl forum, and the answers will be naturally biased twards Perl.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    :(){ :|:&};:

    Note: All code is untested, unless otherwise stated

      If you're running this on Apache, it gives you the option of running mod_perl. This gives you the benifit of having an interpreter built into the server, thus getting an enormous speed increase. AFAIK, neither Python or Ruby have such an advantage. PHP also has a built-in interpreter (mod_php), but mod_perl also offers hooks into the Apache API,

      Even the most cursory peek into the world beyond Perl would have revealed to you that both mod_python and mod_ruby have been in existence for years, and allow hooking into the Apache API.

Re: Is Perl the most adequate language ?
by Theo (Priest) on Oct 17, 2003 at 19:25 UTC
    I hope you post the results of this investigation. I would be very interested in how you were able to work out your differences and most especially, what considerations turned out to be the deciding ones.

    -theo-
    (so many nodes and so little time ... )
    Note: All opinions are untested, unless otherwise stated