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?
- 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.