I have built lots of sites based on perl with CGI.pm and MySQL. I'm self-taught (with the Monks' help) rather than a professional programmer.
However all of these sites have been on a stock web hosting account on an Apache server, with the simple model of:
- browser requests URL
- perl runs script at that URL (mostly using .htaccess and rewrite to fake "directories" so that /foo/bar/ is really ?x=foo&y=bar)
- Apache serves up content after the script runs
- script goes away
What I don't quite get is how the next, more professional kind of web app works, things based on Catalyst or Mojolicious etc. My question include, but are not limited to:
- Do they require mod_perl?
- How do you start and stop them?
- Can I run this kind of self-contained app-and-server system on regular commercial hosting or do I need a VPS type setup where I'm root?
- What happens if they crash or the server gets rebooted, etc?
- Where is Plack in all this?
- Could I easily convert my CGI-type sites to this model?
- What makes this system better? Catalyst tutorials all say you can run the thing as CGI but it's not recommended.
As I said, I am totally confident in creating websites the "old" ("dumb"?) way, but this next step is a big gap in my knowledge. Is there a book or a tutorial aimed at taking me to that next level? Or can someone here sum it up succinctly?
UPDATE:
- I'm getting the idea that it's not more professional to create web apps this way, simply that the frameworks are big, and that they're slow if you don't.
-
I roughly get what Plack is now.
-
Three of my questions has been answered, I now know that you stop/start them as servers the way you can start/stop your Apache with apachectl and you make sure they restart with the server by setting up your /etc/init.d just the way you set up your FTP daemon or whatever, so you need that level of control.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.