[Catalyst] Controllers and Inheritance
    Andrew Bramble 
    andrew.bramble at omnilab.com.au
       
    Sun Mar 19 02:36:27 CET 2006
    
    
  
Hi All, 
I recently tried building an extensible CMS style catalyst app, which proved 
two things to me;
1) Catalyst mays a lone programmer way more powerful.
2) My design sucked , but I can learn from that.
My biggest issue was I wrote MyApp::Controller::CMS with crud type methods 
like;
sub create : Local {
	# do interesting stuff like authorization/roles/ CDBI
}
and Class properties allowing a descendant to define what types of CMS objects 
it was prepared to acknowledge.
and then inherited from that it the 'real' cms controllers.
The result being MyApp had a proliferation of Local create/edit/delete for 
each controller that inherited MyApp::Controller::CMS. Also there existed 
a /cms namespace that really wasn't relevant.
I would welcome suggestions about how to reduce that complication.
    
    
More information about the Catalyst
mailing list