tlm has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks,
Would any of you know where I can find an example/tutorial showing the use CGI::Prototype? The best I've found is the CGI::Prototype::Hidden that comes with the distribution, but it would help me a lot to look at a fuller example.
I have read merlyn's article discussing this module, but the source code that goes with this article consists only of a few isolated fragments for illustration. Also, I have read various perlmonks.org posts on CGI::Prototype, but I'm still not clear how one uses this module.
My biggest obstacle is Class::Prototyped (the superclass of CGI::Prototype). I understand the basic idea behind Self-like objects, but I don't understand why one would want to use them in place of regular Perl objects. It's clear from the article that Class::Prototyped's functionality is central to the "CGI::Prototype vision", but with the exception of the line
at the top of the file, I don't see how CGI::Prototype::Hidden uses the fact that it is a subclass (or rather a subsubclass) of Class::Prototyped.our $_mirror = __PACKAGE__->reflect;
One problem I already see with the implementation of CGI::Prototype is that potential users not only must become familiar with it and with the Template Toolkit (which seems to me a reasonable thing to expect of a hard-working, underpaid CGI programmer), but must also become familiar with the workings of Class::Prototyped, even though this class has intrinsically nothing to do with writing CGI applications. I think users of CGI::Prototype should not have to know anything about Class::Prototyped to use CGI::Prototype effectively.
the lowliest monk
PS: I've also looked at CGI::Application, but I like C::P's MVC approach more than C::A's run mode approach. Granted, there's more stuff out there on how to use C::A, so I may ultimately go that route, but I'd like to give C::P a try first.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Seeking enlightenment on CGI::Prototype
by Aristotle (Chancellor) on Mar 26, 2005 at 14:11 UTC | |
by merlyn (Sage) on Mar 26, 2005 at 16:28 UTC | |
|
Re: Seeking enlightenment on CGI::Prototype
by metaperl (Curate) on Mar 28, 2005 at 02:39 UTC | |
by merlyn (Sage) on Mar 28, 2005 at 08:20 UTC |