The best name depends on what you consider the primary function: Is the it the ability to handle "nearly static" pages easily, or the 'show_tmpl' system of handle data passed to the template?

I guess the runmode that automatically dispatches to your templates is the main thing.
The system to handle data is just a consequence of wanting to this.


If you are going to write your own runmode just to load a template and stuff data in it,
you do not need the whole data file thing (or even the path_info mapping).



- A new and novel way of managing HTML::Template input:
  keeping the input for each template in it's own file.
  I don't really see the use of this. :)

Well, it does away with the need to know anything about the templates in your runmodes, not even what kind of data they need/want.


Perhaps you have a system where you have moved 95% of your functionality
into DB Access modules and other "Model" modules, so your CGI::App run
modules are virtually shells.

I have.
Actually, I moved almost all of the functionality into stored procedures of the database,
and the Perl part is really just a shell to call those procedures from the web.
Basically, my Perl DB access code just looks like


my $result = MyDB::run_query ( $procedure_name, $app, qw[ list of parameters ] );

where the parameters for it are taken from the CGI query string.
For example
        http://mydomain/bbs/index.html?rm=delete_bbs_message;msg_no=1234

uses
my $result MyDB::run_query( 'bbs.delete_message', $app, qw[ sessionid msg_no ] );


and gets turned into

        begin
                :r := bbs.delete_message (:sessionid, :msg_no );
        end;

The $result that is returned is an error code.
If there is no error, the application dispatches to the template indicated in the URL (bbs/index.html).
If there is an error, an approriate error message is displayed instead (or in addition).


The advantage is that I can access the application logic not only from within the webapp, but also from
other Perl code, or from Java code, or using the SQL command line.



That's the great thing about a flexible plug-in system-- We can each
plug-in the pieces that work best for us. If this system works well for
you, chances are that someone else will appreciate it as well.

I will upload it to CPAN once it has a proper name :-)


Cheers,

Thilo


--------------------------------------------------------------------- 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]



Reply via email to