[Catalyst] catalyst tutorial: MyAppDB/Book.pm vs. MyApp/Model/Book.pm

mla maurice.aubrey at gmail.com
Tue May 15 11:08:38 GMT 2007


Matt S Trout wrote:
> On Tue, May 15, 2007 at 12:10:15AM -0700, mla wrote:
>> But I'm thinking a better layout would be:
>>
>> /lib
>> ./lib/Try
>> ./lib/Try/Catalyst/Model
>> ./lib/Try/Catalyst/Model/DB.pm
>> ./lib/Try/Catalyst/View
>> ./lib/Try/Catalyst/View/TT.pm
>> ./lib/Try/Catalyst/Controller
>> ./lib/Try/Catalyst/Controller/Root.pm
>> ./lib/Try/Catalyst/Controller/Users.pm
>> ./lib/Try/DB.pm
>> ./lib/Try/User.pm
>> ./lib/Try.pm
>>
>> That makes the relationship between M/V/C and Catalyst explicit, and
>> leaves the rest of the namespace available for generic use.
> 
> I tend to use MyApp::Web rather than ::Catalyst since then if I need a
> second web interface I can create MyApp::WebAdmin or whatever.

Ah, good point. Thanks.

Maurice




More information about the Catalyst mailing list