[Catalyst] Shoot out -- Catalyst / RoR / Other MVC apps --
Christopher H. Laco
claco at chrislaco.com
Wed May 9 13:56:10 GMT 2007
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)...
-=3DChris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070509/8493=
ef44/signature.pgp
More information about the Catalyst
mailing list