in reply to Suggestions on study materials for modern perl web development

i know and have read somewhere that CGI is no longer part of the standard Perl module distribution that Perl comes with

So what does that mean?

The answer is, it means nothing. CGI is perfectly useful, widely used, well supported, and a good introduction to web application programming.

In the old, old days programmers used CGI's HTML-printing methods to output their script's HTML, often in the main program code. This is indeed bad practice because of the lack of separation between program logic and output presentation, and since almost 20 years it has been recommended to use a different method to output your HTML - Text::Template or the Template Toolkit or Template::Tiny are good choices to explore.

But CGI is an exceptionally well-seasoned package for beginning web application programmers and for experienced developers who need a quick way to build simple interactive sites/pages, and you should not overlook it because of a remark that you read on-line, without understanding what that means. Here's a somewhat recent discussion on the subject.

Having said all that, in regard to the "modern" frameworks, I would say this:

In any case in your situation I would experiment with building a small test application in each of the above before hitching my wagon to one particular horse.

Hope this helps!

The way forward always starts with a minimal test.
  • Comment on Re: Suggestions on study materials for modern perl web development

Replies are listed 'Best First'.
Re^2: Suggestions on study materials for modern perl web development
by Discipulus (Canon) on Feb 02, 2016 at 12:10 UTC
    Good summary,

    If you are interested in why Dancer2 come out you can profit Dancer 2, or Why I Rewrote Everything

    Regarding the CGI module, the same page you linked contains the exact chapter explaining why it was removed that contains the following statements:

    The rationale for this decision is that CGI.pm is no longer considered good practice for developing web applications, including quick prototyping and small web scripts. There are far better, cleaner, quicker, easier, safer, more scalable, more extensible, more modern alternatives available at this point in time. These will be documented with CGI::Alternatives.

    Sounds to me like a more than authoritative opinion.

    In the other thread you mentioned i've posted the link to an interview with SayerX where he reports us the Lincol Stein's (the author of CGI) reply to the Cgi must die talk.

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

      Hi Discipulus,

      I'm familiar with the quotations you cited, but in my view you don't have to read very far between the lines to see that the motivation of their authors is to move readers towards the solutions that they (the authors) favor (and develop).

      While there's nothing wrong or sinister about that, it should be seen for what it is, and also for what it is not, i.e. any good technical reason not to use CGI when appropriate.

      The way forward always starts with a minimal test.
        Hi 1nickt

        maybe i do not read so far, and i must add that i have big respect for CGI and your work as web dev with it. For sure you know when using it is appropriate. 'Cause my lack of deep experience i do not tell when is appropriate or not; i just wait to have enought time to test some PSGI aware framework.

        From what i read here the author of PSGI had collaborated directly with Lincoln Stein from day 1 on. It seems they had connection in far 2001

        L*

        There are no rules, there are no thumbs..
        Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.