boo_radley has asked for the wisdom of the Perl Monks concerning the following question:
In an idle moment, the following list was developed :
A good CGI framework should provide
Now, the only thing that I'm not happy with are the prevpage and nextpage. I think this method of flow control is pretty limiting -- I have some ideas for improvements; removing those keys, and adding something like traverse_list which would be an array of other pages, and traverse_sub which would determine which one you'd hit.my %pages = ( page_one => {description =>"Sign on", nextpage =>"greeting", prevpage => undef, validator =>\&signon_validate, errorhandler =>\&signon_err, template =>'path\template.html', postsubmit =>\&signon_psub, params =>["username","password]}, );
Right now, I've got a basic engine (which is ugly, and unrefined) that does what I want with the existing structure. I can take user input, query databases, write out, update databases and so on.
BUT. Before I continue, I want to sanity check things. Is this duplication of effort? I know there's at least 3 other CGI website management modules out there, but I don't think they do the same thing (maybe CGI::Application, since it's meant to be subclassed into oblivion). Secondly, does this approach make sense? I'd really appreciate any input before I begin the arduous quest of modularizing all of this only to be told "this does exactly what foo::bar does, only ugly."
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Refining the CGI process through structure and templates
by Corion (Patriarch) on Apr 16, 2001 at 20:14 UTC | |
by markjugg (Curate) on Jun 03, 2001 at 19:27 UTC | |
Re (tilly) 1: Refining the CGI process through structure and templates
by tilly (Archbishop) on Apr 16, 2001 at 20:52 UTC | |
More refining
by boo_radley (Parson) on Apr 17, 2001 at 17:53 UTC | |
Re: Refining the CGI process through structure and templates
by michellem (Friar) on Apr 17, 2001 at 00:21 UTC |