On Sep 25, 2005, at 2:01 PM, Randal L. Schwartz wrote:

That's why I created CGI::Prototype::Hidden... to lazy-load the code
for the particular step of the application.

Randal, this really piqued my interest and after a little poking around I found this link;

        http://www.stonehenge.com/merlyn/LinuxMag/

and read these articles;

        Introduction to CGI::Prototype (part 1) (May 05)        
        Introduction to CGI::Prototype (part 2) (Jun 05)        
        Introduction to CGI::Prototype (part 3) (Jul 05)

and what you're doing here started to sink in a bit. The way "lazy-load" works is still magic to me, but it seems to perfectly answer the problem I was worried about. But I learned more than that and I just love the logic used here...

"The state is used to select a particular class for the controller, along with the default template for that class. Once a state has been selected, the corresponding class is loaded into the program (unless already defined), and used to determine the next step in the program. This ``lazy loading'' behavior permits a minimum of loading for CGI programs: at most, two different state-named classes are loaded per web hit."

I read this right after a few hours of playing with an easier way to get the name of template I wanted after a user submits a form. I came up with a solution that I thought worked pretty good, then I realize that you've done away with the problem altogether. I can use this logic in any cgi application I make, it's so simple and makes such good sense.

I'll read the above articles a few more times and then create a small app with CGI::Prototype in a day or two. I'm pretty slow at absorbing this stuff but I must thank you for helping me better understand where I need to go and how to get there with my cgi applications.

BTW, how's the "Cookbook" coming?

Kindest Regards,
--
Bill Stephenson


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to