[Catalyst] recommendation

Octavian Rasnita orasnita at gmail.com
Mon Nov 10 18:33:13 GMT 2008


From: "Chisel Wright" <chisel at herlpacker.co.uk>
> On Mon, Nov 10, 2008 at 07:31:09PM +0200, Octavian Rasnita wrote:
>> Especially for a beginner, but not only, the most simple way of creating
>> the DBIC classes for a Catalyst app is to use the DBIC::Schema helper.
>>
>> I've seen that there are many components of DBIx::Class that can't be
>> used if using this helper, because they should be loaded before Core or
>> they require changing the part of the class that can't be modified.
>>
>> Which is the recommended way for creating a complex app that needs using
>> those components?
>
> I'm not 100% certain what you're asking here.
>
> Are you using DBIx::Class::Schema::Loader with "create=dynamic"?

No, I use it with create=static.

> I've always used "create=static" to give me the initial files
> to work from, and have extended, adjusted and tweaked them as I extend
> my schema.
>
> After the initial create.pl has been run I make all changes manually.
> I'm probably doing it "wrong" though.

When I make changes to the database, I use to make them all, then update the 
DBIC schema with the Catalyst helper.
If I would need to make the changes manually, I could forget that I've 
changed the length of a field in a table, or that I added a foreign key in 
another table, and I don't know how to avoid that because using the Catalyst 
helper was much easier.

But maybe using the Catalyst helper only is not a good way either.

It would be very helpful if there would be a recommended way of using 
Catalyst, DBIC, HTML::FormFu, UTF8Columns, SHA-1 encoded columns and other 
few components which are very useful in a Catalyst app that would require as 
few effort as possible.

Octavian




More information about the Catalyst mailing list