J. Shirley wrote:


On 10/19/07, *Dave Rolsky* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    On Fri, 19 Oct 2007, J. Shirley wrote:

     > Here's a good path to follow:
     > 1) How would I accomplish [business goal] as a library that other
    people can
     > use?
     > 2) How can I test [business goal]
     > 3) Write that API as a separate perl module (MyApp::BizLogic)
     > 4) Now, write a thin Catalyst adapter class
    (MyApp::Model::BizLogic) that
     > provides the Catalyst hooks to make it easier to talk to in the
    controller.

    As an aside, I don't really grok #4. My big Catalyst project has been
    converting an existing Mason/Alzabo site to use Catalyst, but with the
    same model classes using Alzabo.

    I've had to do very little to hook Catalyst to my model, beyond writing
    some thing adapter classes to make the Authentication plugin happy. What
    exactly do people put in their Catalyst Model classes?


    -dave


Well, I mostly put in an adapter class to make auth happy ;) -- also, you can put in some other caching logic that is only relevant while running inside of Cat.

-J

Exactly! Or passing $c->log to your models, or even passing the app's base URL if your model's need to generate URLs (for email, etc).

- b

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to