[Catalyst] New CRUD/Scaffolding module
Mike McKay
mike at vdomck.org
Fri Jun 24 08:21:52 CEST 2005
Perrin Harkins wrote:
> On Thu, 2005-06-23 at 21:58 +0200, Johan Lindström wrote:
>
>>When I developed a Maypole application I found that it required quite a bit
>>of code spelunking to get things done. So I'm curious: is it possible to
>>get started with any of these frameworks without looking at the source?
>
>
> Yes. The OI2 docs are excellent, and CGI::Application is so simple that
> you hardly need to do more than look at the synopsis and examples.
> CGI::App has different goals than Catalyst though.
>
> One thing the OI2 docs do is offer some basic explanation of things that
> are not specifically part of it but that you have to know in order to
> use it, like Template Toolkit. (You could use something else, but the
> tutorials have to choose something.) Most people balk at doing that,
> but I think it paid off in terms of how complete the tutorials are.
I just started Catalyst hacking this week, and it has been exciting but
also pretty challenging/frustrating at times. I considered myself a
pretty good perler, but what I was good at was writing everything from
scratch. Doing things the Catalyst way has taught me that most of the
basic problems I run into have already been solved. Figuring out how
find use those pre-built solutions and getting in the mindest of the
implementor is the challenge (Template Toolkit for example). Using a
combination of hops/mojo/serverdb I am slowly getting my head around
everything. I have read the Intro doc 3-4 times, and each time I
understand it more and more. I have read the Cookbook doc 10 times
probably, and it is a good start, but it needs more explanation - too
much knowledge is assumed.
<rant>
Apologies to the author, but this sentence just pisses me off:
Modify the $c->form() parameters to match your needs, and don't forget
to copy the templates. ;)
I am pretty sure that wink is there to piss me off: Wink - you have no
idea what I just said - wink. No wonder us Catalyst newbies are
struggling with scaffolding.
</rant>
I think most people that do use Catalyst will be the learn-from-example
types. It would be really helpful to over-comment the code that is being
used for the examples. I mean, I am eventually understanding it and
debug and Data::Dumper helps, but a brief comment would really speed me
on my way.
Now perhaps I will reveal my true ignorance, but how are we supposed to
know which methods come from where:
my $loader = $c->comp('Hops::M::CDBI')->loader;
comp? I never saw that in Catalyst::Manual::Intro.
[% class.to_field(column).as_XML %]<br/>
maybe it is obvious if you are familiar with Class::DBI and the many
other (really helpful) plugins that are used, but it took a while for me
to find this one. I came up with a script to figure out where the
to_field comes from:
grep -rni to_field /home/crazy/.cpan/ | pgrep -b "lib/(.*\.pm)" | uniq |
perl -p -e "s/lib\//perldoc /; s/\//::/g;s/\.pm//"
Any suggestions to guide me would be much appreciated - and clearly my
experience will be improved upon as documentation expands, examples
mature, etc. Catalyst has so much potential.
A wiki would be great, and I must say, the brief time I spent in IRC was
really really helpful. But I am dialing in from an expensive connection
in Africa and I can't hang out in IRC all day - at least not until my
VSAT arrives. :-)
Keep up the great work, and hopefully I will be able to add to the
documentation once I get my head around everything.
Cheers,
Mike
More information about the Catalyst
mailing list