Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Perl and Fastcgi + template system (confused)

by Martin90 (Sexton)
on Jul 14, 2014 at 14:12 UTC ( [id://1093559]=perlquestion: print w/replies, xml ) Need Help??

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

Hello monks, I am looking for some help in aspects like Fast CGI and template systems in PERL based websites. I am not sure if I understand this aspects correctly.

So, first of all if let's assume I have a nginx or apache server, do I need to worry about fast cgi script executon and all works related to fast cgi from perl ? I think my server is responsible for this and no addition perl modules are needed just to run fast CGI, am I right ?

Next, I am looking for good (fast) way to link html with perl. I found HTML::Template module which I tested and works good (at least does the job which I need) and Mojolicious framework which is nice and has many features, but I worry about it's performance and execution speed. So basicly I am looking for fastest possible way to link perl with html output, even if it will be "low level".

What can you recommend for this and what about Fast CGI ? ;)

Regards.

  • Comment on Perl and Fastcgi + template system (confused)

Replies are listed 'Best First'.
Re: Perl and Fastcgi + template system (confused)
by InfiniteSilence (Curate) on Jul 14, 2014 at 14:29 UTC

    You seem a bit stuck on FastCGI. I think you should consider reading this article titled, "Which is better perl-CGI, mod_perl or PSGI?"

    Celebrate Intellectual Diversity

Re: Perl and Fastcgi + template system (confused)
by Anonymous Monk on Jul 14, 2014 at 20:12 UTC
Re: Perl and Fastcgi + template system (confused)
by sundialsvc4 (Abbot) on Jul 14, 2014 at 15:23 UTC

    Quite honestly, I think that right now you are “stuck” by wanting to “move forward right now” when ... quite understandably, actually ... you have no idea either where exactly you are going, or what sort of technology might take you there.   It’s like you’ve stumbled onto a Sears & Roebuck Catalog full of all sorts of tasty-looking things and you just want to order all of them and “have a go” at making something work.

    What I cordially suggest that you do right now is to stop.   Spend at least today, maybe a couple additional days, “surfing the net” to carefully(!) read several articles regarding each of the technologies that you have listed in your OP, but refusing to treat any of them as a white-rabbit begging to be chased.   You can start chasing rabbits again, say, next Thursday.   Not sooner.

    You need to be sure you know, for instance, just how “vanilla CGI” works.   You need to have a notion of what content-management systems (Dancer, Drupal, Catalyst, what-have-you) do, and when they are (and aren’t) called-for in a project.   You need to understand what templating systems do, and where and how they can be useful for preparing HTML or other content.   You need to know what nginix does.   I consider it highly doubtful that you will actually need to delve into either FastCGI or mod_perl for this project, given that neither you nor I understand, at this point, what the project needs to be.

    Gather information, without chasing rabbits.   Then, make a plan for how you will go about catching the little white-haired beast.   Now, when you walk out into that field again, you’ll come home with dinner.

      You need to be sure you know, for instance, just how “vanilla CGI” works... (and a lot of stuff...)
      Is it any wonder that PHP ate Perl's lunch despite being strictly worse as a programming language?

        Provocative though that might be as “spam bait, and nothing more,” the key take-away that I glean from the original post is that “the OP does not yet know what s/he wants to achieve, let alone how to achieve it.”   And, until that point is reached, quibblings about “CGI vs. FastCGI vs. mod_perl” are entirely beside the point.   This seems to me to be “a very basic question, thoroughly clouded by buzzwords.”

        Anyone in such a position would find himself/herself equally confused, “equally without a plan,” whether they were working in Perl or PHP.   (Since I count myself equally-conversant in both tools, and many more, I do feel that I am qualified to say that.)   The first order of business now should be to define what (exactly!) is the problem to be solved.   From this, everything else will follow.   At this point, we should assume that “good ol’ CGI” will be more-than sufficient, given that the OP does not yet appear to be decided as to what to implement, let alone how.

        (And this, by the by, comes as absolutely no surprise.   The discovery process is, after all, methodical.   “One step leads to another, and if you try to rush things you fall upon your a*s.”)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1093559]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-24 09:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found