[Catalyst] Best practice: How to build app parts reusable?

Robert Krimen robertkrimen at gmail.com
Wed Jun 10 18:02:26 GMT 2009


On Tue, Jun 9, 2009 at 1:39 PM, Tomas Doran <bobtfish at bobtfish.net> wrote:

>
> This is neat, but in no way taking advantage of the new Moose code.
>
> I have some code in the CatalystX::DynamicComponent namespace meant to
> solve this problem:
>
> http://github.com/bobtfish/catalyst-dynamicappdemo/tree/master
> http://search.cpan.org/dist/CatalystX-DynamicComponent/
>

I actually stumbled on this when I was poking around the AutoCRUD code. It
looked really interesting, but also a lot more complex than what AutoCRUD
was doing

 <http://search.cpan.org/dist/CatalystX-DynamicComponent/>
> CatalystX::DynamicComponent (which solves around the same problem you're
> solving) is fairly solid at this point. The other things based off it whi=
ch
> are also in the dist - much less so...
>
>
My initial approach was to provide an application class role, but I think I
> may prefer your approach of putting all of the logic into it's own class,
> which you then pass the application class to permute.
>

My idea was also to provide a Catalyst::Plugin::InjectComponent for people
that wanted to integrate that functionality directly into their Catalyst
application. It would provide an ->inject_components stage and an
->inject_component helper... possibly even scanning
$config->{'Plugin::InjectComponent'} for stuff to load


> Would you be interested in collaborating on this? Initially I think I'd
> fork your code and compose my pre-existing role onto it to see how far th=
at
> gets us / how much of the ugly code you inherited from AutoCRUD goes away.
>
> Sound reasonable?
>

Sure, I'll take a look. I think there's room enough on CPAN for both
solutions. My stupid simple AutoCRUD reimplementation, and your more
advanced role-based compositing. I'd be happy to include a SEE ALSO and a
mention in DESCRIPTION so that people can find both easily.

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090610/c27e6=
af3/attachment.htm


More information about the Catalyst mailing list