in reply to Re: Why can't mod_perl+Mason just work?
in thread Why can't mod_perl+Mason just work?

New students do not pick and choose from a variety of languages. My point is that Perl isn't giving itself a chance of competing for mindshare in web development college courses because of the compatibility and usability headaches. I rarely see ANY Perl courses for web developers these days, let alone mod_perl, while PHP courses are ten-a-penny. The Perl community can ignore it if they wish but I can't.

Coming to your individual points:

  • Comment on Re^2: Why can't mod_perl+Mason just work?

Replies are listed 'Best First'.
Re^3: Why can't mod_perl+Mason just work?
by dragonchild (Archbishop) on Aug 12, 2004 at 14:38 UTC
    Currently, I use CGI::Application for the code and HTML::Template for the presentation layer. It's rudimentary, but gets the job done. Using that setup also allows me to use PDF::Template and Excel::Template for different formats.

    AFAIK, Template doesn't easily generate PDF or Excel files. (The docs and the book seem to imply that to create PDF or Excel files using TT, you must generate the PS (for PDFs) or the MS XML (for Excel), both of which are non-trivial.) I do want to migrate to TT for its ease of use, but I haven't had the time to create TT plugins for those formats.

    Plus, frankly, PHP serves a very important purpose - allowing less-experienced programmers to create smaller1 web-applications. Perl has a much higher learning curve. Personally, I wouldn't teach Perl as the first language for programming anything, let alone web applications. If I were teaching general programming, I would start with either Pascal or LISP, both of which were designed for teaching. If I were teaching web applications, I would start with PHP or .NET, because they are designed to develop web applications. (The choice between the two would depend on which webserver I was using.)

    After the students master the concepts behind programming, then I would teach them Perl. Perl, frankly, is too powerful for the novice user. It doesn't hold your hand enough. This fact makes it good for the expert, but bad for the novice. If you ask around, you'll find that nearly every top-notch Perl hacker knew 2-3 other languages before learning Perl. Almost invariably, those languages are from the following list:

    • Pascal
    • LISP
    • C/C++
    • Java
    • BASIC
    • Fortran

    With the exceptions of LISP and C/C++, those languages are more rigid. Rigidity is good for novices. Pedagogy requires the gradual introduction of concepts. You can't throw someone into the deep end and expect them to swim very well. Most people are frustrated by programming and walk away. Or they develop bad habits which are almost impossible to break later on, which is even worse.

    1. Yes, I am fully aware of what can be built with PHP. But, I'm also aware that those larger sites were built by people who could have just as easily built them in Perl, C++, COBOL, or ASM , for that matter. Good programmers can build X in any language. Lesser programmers need the help provided by well-designed languages. PHP is a well-designed domain-specific language.

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

    Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

    I shouldn't have to say this, but any code, unless otherwise stated, is untested

      I tend to agree with you here. I taught an introductory course in Perl, and it was someone's bright idea to stick a complete novice to programming in the class. Quite frankly, it was a mess. TIMTOWTDI is a great guy and all, but he confuses the heck out of new programmers! ;)

      That being said, I'm at a loss as to why newbies are being taught mod_perl (or are they not newbies???). Perl itself will be enough for these students to handle without the complexities of mod_perl thrown in.

Re^3: Why can't mod_perl+Mason just work?
by Joost (Canon) on Aug 12, 2004 at 14:36 UTC
    My point is that Perl isn't giving itself a chance of competing for mindshare in web development college courses because of the compatibility and usability headaches.

    Which usability issues are you talking about? As shown in the other other responses, there are plenty of "out of the box" installations of mod_perl (even on windows). Also keep in mind that mod_perl has a different goal than PHP: it is supposed to give direct access to the Apache API, and thus is a lot tighter coupled to specific apache versions.

    If you don't use things like Mason or Apache::Template how do you separate your presentation and business logic? How do you implement templating? Seriously, I'm interested in alternatives.
    Mason is hardly an example of a clean separation of business logic and presentation, and neither is Apache::Template. Modules like CGI::Application or Apache::MVC do a much better job of it, IMO.

    Joost.

Re^3: Why can't mod_perl+Mason just work?
by chromatic (Archbishop) on Aug 12, 2004 at 16:20 UTC
    Someone in the Perl community needs to take the student mindshare seriously.

    Good job, you've just identified a volunteer opportunity!