Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

CGI Alternatives

by seanc (Novice)
on Jan 22, 2016 at 12:30 UTC ( #1153367=perlquestion: print w/replies, xml ) Need Help??
seanc has asked for the wisdom of the Perl Monks concerning the following question:

I need to create a simple HTML form with a database backend. I have done this sort of thing with CGI in the past, but I believe PSGI/Plack is the preferred alternative now. Is that correct, or is there something else I should be looking at? Should I be looking at a complete framework like Catalyst?

Any good starting points? I've found the following so far:

  • http://perlmaven.com/getting-started-with-psgi
  • http://savage.net.au/Perl/html/plack.for.beginners.html
  • http://plackperl.org/

This will run on an Ubuntu 14.04 server, with Apache.

Replies are listed 'Best First'.
Re: CGI Alternatives
by VinsWorldcom (Parson) on Jan 22, 2016 at 12:37 UTC

    For "simple", I've used Mojolicious (http://mojolicious.org/). The Mojo-casts (http://mojocasts.com/e1) helped me get going. It's bundled with Strawberry Perl (5.22.1) but an older version, so I just did a "cpan Mojolicious" for a smooth upgrade.

    I've used SQLite, MySQL and Microsoft Access as the backend database - they all work fine with Mojolicious - as long as you have the appropriate DBD module (driver).

Re: CGI Alternatives
by Myrddin Wyllt (Hermit) on Jan 22, 2016 at 14:13 UTC

    Catalyst is probably overkill for a single HTML form, but either Mojolicious or Dancer are good, well-maintained frameworks that make creating basic web applications very easy.

    I would say that using one of these would be quicker than trying to code directly on top of PSGI/Plack, as they are both well documented - rolling your own would result in a smaller codebase, but would probably take a lot longer to get up and running.

Re: CGI Alternatives
by ww (Archbishop) on Jan 22, 2016 at 21:44 UTC

    But, IMO (nah, not "humble") neither of the above fine replies should be read as deprecating PSGI/Plack if you're comfortable with what you've found already... and (again, IMO) if you do go the P/P route, you'll probably feel that you have finer control.



    Quis custodiet ipsos custodes. Juvenal, Satires

    check Ln42!

      Originally I was probably trying to avoid frameworks because of my (very limited) experience with Ruby on Rails, but having had a quick look at Dancer and Mojolicious, they don't appear to be quite so much designed to confuse and bewilder me, so I think I'll start there. Thanks for the input.
Re: CGI Alternatives
by hotchiwawa (Scribe) on Jan 23, 2016 at 14:16 UTC
      I've started on the Web casts. It looks impressive.
Re: CGI Alternatives
by Discipulus (Monsignor) on Jan 29, 2016 at 09:40 UTC
Re: CGI Alternatives
by seanc (Novice) on Jan 23, 2016 at 06:18 UTC
    Thanks for the advice. Mojolicious and Dancer look very promising.
Re: CGI Alternatives
by seanc (Novice) on Jan 29, 2016 at 05:46 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1153367]
Front-paged by Corion
help
Chatterbox?
and snow settles gently...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2017-12-15 22:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (443 votes). Check out past polls.

    Notices?