Hi All
Although I have used perl extensively for non web applications, I am new to the CGI space and am trying to pick a architecture/toolset for web enabling my commandline applications.
My command line applications use Template Toolkit and
Class::DBI to generate reports out of a SQL database
and I would like to leverage the reuse of these tools.
However, in order to webify these command line
applications I believe I need to add a CGI Application
framwork and a form generation and validation tool.
Yes, that will make your life much simpler.
First, I like what I have seen so far of CGI::Application, however, I have seen documentation on the web that indicates CGI::Application has been superseeded by CGI-Builder. Is this true?
Don't expect an unbiased answer to this question, since you ask it on the CGI::Application mailing list. You may get a different answer on the CGI::Builder mailing list.
That having been said, I would disagree that CGI::Builder has superseeded CGI::Application. CGI::Builder (formerly CGI::Application::Plus) is mainly a reimplementation of the same ideas that CGI::Application framework has built upon for years. It looks like it has some new ideas and functionality added in, but at the core the modules are very similar and serve a similar purpose. You will have to judge both modules on their own merits, as I haven't used CGI::Builder yet (since it is a new development and has only been available for a month or so).
The fact that CGI::Application is small and simple is one of it's greatest assets. It follows the Unix philosophy of doing only one thing and doing it well. Some may say this is also a drawback to someone starting out with it, since it doesn't automatically provide session management or authentication or database access. But there are efforts underway to build very simple glue modules to simplify the use of these other very useful modules (see C::A::ValidateRM and C::A::Session for 2 examples).
Regardless of that, if you were looking for a tool that spoonfed all of the standard CGI tools like auth, sessions, etc... then you should really be looking at Mason, or Apache::ASP, or OpenInteract or one of many other toolkits that come prepackaged with these features.
Assuming it isn't, what is the best form generation and validation tool/module to use with CGI::Application given that I already use TT2?
I use TT2 and Class::DBI with my C::A apps regularly. I am currently finishing up a new glue module that will simplify the use of TT2 from within C::A, but it is really quite simple to do yourself (if you like, I can give you or anyone else a preview release of C::A::TT to have a look at).
As for form generation and form validation, many people use Data::FormValidator and HTML::FillInForm together to provide those features. I personally don't auto generate my forms as they are statically defined in the templates by the template designers, hence I use HTML::FillInForm to populate my HTML forms.
I hope I have given you some useful answers. You will find there are ample resources out there for CGI::Application, and there is a large community of users willing to help out.
Cheers,
Cees
--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
