From: "shawn wilson" <ag4ve...@gmail.com> > > any of y'all write web apps in perl? what do you use? i'm using > > html::template but i was thinking of going back to straight cgi.pm or having > > my perl send back json for the page to render (but i'm not that familiar > > with js). thoughts?
This is a pretty general question and there are many prefered ways of creating web apps in Perl. My suggestion would be to use Catalyst framework, DBIx::Class ORM for accessing the RDBMS, Template-Toolkit templating system, HTML::FormFu form processor. Catalyst is used for solving the dispatching from URLS to the code you want to run, for handling the authentication, authorization, charset encoding, for separating the business layer - the model, the web flow level - the controller and the view level, for I18N, for creating tests and for many other things in a very easy way. DBIx::Class have a steap learning curve but it will let you access the databases in a much easier and elegant way, so the app will be much easier to maintain than using DBI.pm directly. Template-Toolkit is a very powerful templating system, much more flexible than HTML::Template and without the problem of mixing the Perl code with the HTML code as Mason requires, so the templates are more elegant and easy to maintain. HTML::FormFu is a very good form processor that allows you to create complex forms with a very clean code, and the result of those forms can be inserted or taken directly from the database without code that specifies each form field or database table field. Around these modules there are many others that make your life easier. Catalyst has a plugin that renders the data structure you specify in JSON format and it is very easy to use any popular JS framework as jQuery, Dojo, ExtJS, YUI or another to render it as you want. No matter if you will use Catalyst or another framework like CGI::Application, DBIx::Class or another ORM, Template-Toolkit or Mason, HTML::FormFu or HTML::Handler, they all are pretty good ideas, but going back to CGI.pm for more than simple web apps which are very rarely accessed is just a joke. And of course, running these applications with Fastcgi, mod_perl or another persistent environment is a must. Octavian -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/