[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] Re: Yet another callback system proposal


On 2005-05-25, Michael Graham <suppressed> wrote:
>
> In the case of our framework, I'm mostly worried about people one day
> deciding to add a cgiapp_prerun method to their application and then
> spending an hour wondering why the whole framework suddenly broke.
>
> I guess the safe thing to do (in a callback-free world) would be to
> include the following code in every example app:
>
>     sub cgiapp_prerun {
>         my $self = shift;
>
>         # leave this line alone!
>         $self->SUPER::cgiapp_prerun;
>
>         # ... add your own pre-run code here ...
>
>     }

I see. So the callbacks design can help to future-proof the code a
little in this case. 

> Anyway, as much as possible we're trying to make the architecture of the
> framework transparent and let people write normal CGI::Application
> programs (including cgiapp_init, cgiapp_prerun, etc.) without
> interference.  Obviously they have to be aware that framework stuff is
> going on at the various phases, but the mechanics shouldn't get in their
> way.

That seems like a really nice way to make a framework. People get to
code the same way, but suddenly there is a more value added to the
process.

I look forward to reviewing this framework code in more detail.

    Mark

--
 . . . . . . . . . . . . . . . . . . . . . . . . . . . 
   Mark Stosberg            Principal Developer  
   suppressed     Summersault, LLC     
   765-939-9301 ext 202     database driven websites
 . . . . . http://www.summersault.com/ . . . . . . . .


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.