[Catalyst] Application design best practice

John Napiorkowski jjn1056 at yahoo.com
Fri May 18 18:10:28 GMT 2007


--- Richard Jones <ra.jones at dpw.clara.co.uk> wrote:

> Having struggled to get my actions to match my urls
> the way I (think) I 
> want, it was suggested in another thread that I put
> one or more action 
> methods in the Root controller. I would be
> interested in opinions about 
> what should/should not go in the Root C. At the
> moment I just have login 
> logic in the auto sub (a la Tutorial), and a
> query_log routine.
> 
> I know Catalyst is flexible, and will work OK
> whatever, but there might 
> already be some good ground rules covering this. I
> am anxious to avoid 
> generating an app with a large collection of methods
> in Root and not 
> much elsewhere.
> -- 
> Richard Jones

Hi,

That was me that mentioned the Root controller option.
 It's not at all best practice to simple chuck
everything into root; I only suggested it as a way to
get you past the initial learning curve where you are
now frustrated because things are just acting strange
and you don't know why.  I promise you with a little
effort and time it will become more clear, just if you
can't get anything at all to work you will get very
frustrated.

Typically I have in my Root.pm a default action to
catch anything not caught, auto for centralizing my
authorization and a catchall end controller.  I also
tend to chuck ideas I am playing with there, since
it's easy.

--john


> 
> 
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo:
> http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
>
http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Catalyst mailing list