Jamie Neil wrote: > RA Jones wrote: >> Absolutely - I'm in exactly the same position, and am following almost >> exactly the same process, except that I abandoned RoR early on and >> decided to stick with Perl for the re-write. Catalyst was an entirely >> new concept to me, having progressed from a long-list-of-if-elsif-else >> type scripting -> CGI::Application -> Catalyst/DBIC and found, and am >> still finding, it hard going. The Tutorial was a massive help, without >> which I'm pretty sure I could not have even got off the ground, and so >> is the Catalyst & DBIC mailing lists, but would also find an article >> on next-step development and best practices extremely useful. Count >> this as a vote in favour. > > What he said :) > > I've spent the last week or so trying to distill out the essence of how > other people have done it (Handel and C::M::DBIC::Schema mostly), but > the amount of unfamiliar modules and coding techniques is making my > brain hurt. >
Handel? Well there's your problem... :-)
I'd love to write about how I've done things in Mango...if I only could
make myself have the time to do it. To be honest, the
outside-core-as-model didn't really become really clear to me until I
stuffed Handel::Cart into Mango as a Catalyst Model.
The best approach for me has been what mst has said before. Make your
core stuff usable outside of the work of Catalyst. Seems like a no
brainer, but when you're just learning Cat and following examples, it's
easy to forget.
For a quick example of how it's done in Mango:
Handel::Cart - seperate app that does cart magic
Mango::Provider::Carts - responsible for cart CRUD API in Mango
Mango::Catalyst::Model::Carts - wraps above in Model instance
MyApp::Model::Carts (isa Mango::Catalyst::Model::Carts)
For non-Handel things in Mango...it's just the last ones:
Mango::Provider::Users - responsible for user CRUD API in Mango
Mango::Catalyst::Model::Users - wraps above in Model instance
MyApp::Model::Users (isa Mango::Catalyst::Model::Users)
The main theme being...the models are just DB thingies...they're
completely usable outside core classes (domains/business logic, etc)...
-=Chris
signature.asc
Description: OpenPGP digital signature
_______________________________________________ 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/
