Paul Campbell wrote:
> I'm interested in any feedback anyone might have for this module.

I know that you probably wrote most of this before the full callback
system was done, but it would be really neat if more of this was
invisible to the user. For instance

   $self->run_modes
    (
        'index'    => 'index',
        'multiply' => 'multiply',
        'divide'   => 'divide',
        'upload'   => 'upload',
        &AJAX_run_modes,
    );

You don't need the &AJAX_run_modes() since your plugin can register them
behind the scenes.

sub index
{
    my $self = shift;
    my $ajax_client = AJAX_load_client;
    my $ajax_init   = AJAX_init;
    ...
    my $html = <<EOT;
<html>
    <head>
        <title>Kemitix::AJAX::App::TestCGIApp</title>
        $ajax_client
    </head>
    <body $ajax_init>
   ...
}

It would be wicked cool if you used a callback registered at postrun to
actually post process the HTML to add this javascript to the <head> and
<body> tags itself. Another feature that now becomes invisible to the user.

As for the AJAX_register_run_mode(), I got a little confused as to which
portions where Perl and which were JavaScript on the initial reading.
I'm still not completely certain of how it works but maybe that would
become clearer as I play with it some more.

-- 
Michael Peters
Developer
Plus Three, LP


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