[Catalyst] how to reuse Catalyst Schema for non-web purposes?
Kieren Diment
kieren at diment.org
Thu Apr 23 03:14:44 GMT 2009
On 23/04/2009, at 12:59 PM, kakimoto at tpg.com.au wrote:
>> From the Catalyst tutes, I seem to get the impression that pretty
>> much a
> lot of the business logic is done in the controller.
>
> I might be wrong but in
> http://search.cpan.org/~hkclark/Catalyst-Manual-5.7020/lib/Catalyst/Manual/Tutorial/BasicCRUD.pod#___top
> ("Add a Method to Process Form Values and Update Database"),
> it seems that the task of creating a new entry for books in the
> database
> and establishing the right relationships to the book_authors db table
> is done in the sub form_create_do in the Controller.
>
> i suppose if a batch script were to be used to add in amany books, the
> logic there would be trapped in the controller.
>
> How do we put that logic into the Model? very interesting and I would
> like to hear more since I cant find any examples for putting business
> logic in the Model for catalyst on google.
>
This: http://blog.hide-k.net/archives/2008/10/dbixclassresult_1.php
is the blog post that I worked it out in, despite the text being in a
language I don't speak :)
More information about the Catalyst
mailing list