[Catalyst-dev] RT #36209: convert internal path seperators for clarity

John Napiorkowski jjn1056 at yahoo.com
Tue Jun 3 15:12:07 BST 2008




--- On Tue, 6/3/08, Matt S Trout <dbix-class at trout.me.uk> wrote:

> From: Matt S Trout <dbix-class at trout.me.uk>
> Subject: Re: [Catalyst-dev] RT #36209: convert internal path seperators for clarity
> To: jjn1056 at yahoo.com, "Development of the elegant MVC web framework" <catalyst-dev at lists.scsys.co.uk>
> Date: Tuesday, June 3, 2008, 2:34 AM
> On Mon, Jun 02, 2008 at 01:11:15PM -0700, John Napiorkowski
> wrote:
> > I've always felt iffy about namespace being part
> of the controller class in this way.  The examples you gave
> (regarding /auto, etc and partitioning controllers) are the
> only ones I can think of as well.  However I have to wonder
> if this is too much tying of information to a controller?  I
> guess the fundamental question I have is if a controller
> should know it's namespace, or if that attribute should
> be assigned to it from from external class or process.  From
> my thinking a controller class should only know enough about
> itself to work, everything else should be passed into it
> from the dispatcher or from some sort of adapter class that
> 'wraps' it for consumption via the dispatching
> mechanism.  So I guess I am wondering if we are at the
> proper level of abstraction here?
> 
> The controller uses the namespace when it calls
> register_actions; I think
> that's correct since that's it telling the
> dispatcher where to add its
> actions to the tree - or at least the controller should be
> able to supply
> a default - it doesn't really seem wrong to me that
> Root.pm can specify that it
> should by default attach its actions under /.
> 
> Post-setup it doesn't really need it at all; action_for
> uses it but that's
> basically just a matter of convenience; no reason you
> couldn't add a
> dispatcher API that looks up the controller to find the
> action rather than
> looking up the namespace - and that's exactly what
> we'd need to build to
> support Foo::Bar->baz style forwards anyway :)
> 
> -- 
>       Matt S Trout       Need help with your Catalyst or
> DBIx::Class project?
>    Technical Director                   
> http://www.shadowcat.co.uk/catalyst/
>  Shadowcat Systems Ltd.  Want a managed development or
> deployment platform?
> http://chainsawblues.vox.com/           
> http://www.shadowcat.co.uk/servers/


      



More information about the Catalyst-dev mailing list