in reply to CGI Design
The advantage which the CGI::Application interface offers is that individual "run-modes" and execution blocks can be defined, each correlating to a particular stage of your CGI interface. Using the CGI::Application "run-mode" interface, the code above could be re-written as follows - Note that some liberty has been taken with the subroutine names and the example code shortened to reflect only that snippet of code shown above:
sub setup { my $self = shift; $self->mode_param('action'); $self->run_modes({ 'AUTOLOAD' => 'action_dialog', 'add' => 'add_dialog', 'add_commit' => 'add_commit_dialog', 'modify' => 'modify_dialog', 'modify_commit' => 'modify_commit_dialog', 'remove' => 'remove_dialog', 'remove_commit' => 'remove_commit_dialog' }); }
Furthermore, the CGI::Application module implements methods to address the CGI and HTML::Template modules, facilitating powerfule methods for the construction of extensible web applications.
In short, I would strongly look into CGI::Application for this type of application or alternatively, some of the different web application frameworks reviewed by princepawn at Web Application Frameworks and their Templating Engines with a Comparative Study of Template and HTML::Template.
Good luck.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: CGI Design
by Dogma (Pilgrim) on Apr 07, 2002 at 01:41 UTC | |
by Hero Zzyzzx (Curate) on Apr 07, 2002 at 02:10 UTC |