[Catalyst] Begginer's question about application structure

Peter Edwards peter at dragonstaff.co.uk
Mon Nov 22 15:29:33 GMT 2010

> Martin Bendix wrote:
>> As a Perl and Catalyst novice, I have recently completed the online
>> Catalyst tutorial, and read the Definitive Guide to Catalyst.  However, I
>> have a few questions about the basic structure of a thin controller, fat
>> model application.
>> I'd like to take my learning to the next stage by writing a fully
>> functioning application, and the classic CD database seems like a good p=
>> to start - it will at least be of use to me when it's done.
>> Given the following basic criteria, I would be grateful for some
>> high-level advice on how best to organise the application:
>> * I will be using DBIx::Class to access the database.
>> * At first, the initial user interface will be web based.
>> * I'd like to structure the application so that I can add additional
>> interfaces with relative ease in future (e.g., command line, web service=
>> etc.).
>> * I'd like to create test scripts for as many of the modules/application
>> functions as possible.
>> * The application will provide the ability to create, search, update and
>> delete artists, tracks, and CDs.
Have a look at this article
http://www.catalystframework.org/calendar/2007/14 which covers using
Catalyst models externally.
The code that goes with it is well out of date but should give you the
general idea using an external DBIC model class.

Access to the model from a batch script:

Test script for model:

Test scripts for web access:


Some more pointers on testing:

Cheers, Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20101122/06499=

More information about the Catalyst mailing list