lib/MyAppDB is where you define your schema (your relations etc.) and
lib/MyAppDB/Model is where you'd use them.
The latest long discussion on where your model should be is basically .... if
your model is only fixed to the web application (blog etc), whack your model in
lib/MyAppDB/Model. If, on the other hand your model will serve other
functionality, then the model should be separate from the web application and
lib/MyAppDB/Model should be used as a thin wrapper to this model.
Check out the discussion here ... it's a long link and goes off at different
angles but you should get the idea.
http://readlist.com/lists/lists.rawmode.org/catalyst/1/7614.html
Have a look at this for another angle
http://www.teambarry.com/?p=38
I hope this helps.
-Ants
mla <[EMAIL PROTECTED]> wrote: I just finished getting the tutorial project
working.
The thing I'm not clear on is this separation between lib/MyAppDB/
and lib/MyApp/Model/
The tutorial says:
"With Catalyst::Model::DBIC::Schema you essentially end up with two sets
of model classes (only one of which you write... the other set is
created automatically in memory when your Catalyst application
initializes). For this tutorial application, the important points to
remember are: you write the result source files in MyAppDB, but within
Catalyst you use the automatically created model classes in MyApp::Model."
So using DBIC::Schema, I would never create anything within the
lib/MyApp/Model directory, other than the MyAppDB.pm module?
All the real models live in lib/MyAppDB? And if I wanted to use a
model *outside* catalyst, I'd use MyAppDB::Book, but within
catalyst it would be MyApp::Book?
Is this how most of you structure your projects? Is there a way
to get the real models in lib/MyApp/Model?
Thanks.
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/
---------------------------------
Inbox full of unwanted email? Get leading protection and 1GB storage with All
New Yahoo! Mail._______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/