[Catalyst] Catalyst::Model::DBIC::Schema or not?
autarch at urth.org
Fri Apr 27 18:01:45 GMT 2007
On Fri, 27 Apr 2007, Jason Gottshall wrote:
> I tried eliminating Catalyst::Model::DBIC::Schema in favor of having my
> true business Models do all the interfacing with DBIC. No problem with
> those Models, but I did discover an unintended consequence:
> Catalyst::Plugin::<whatever>::DBIC stuff stopped working!
Well, that shouldn't be a surprise ;)
> It was specifically the storage components for Authentication and
> Session that choked. I couldn't figure out how to give either of them
> the connection info they needed; they both expect to be configured with
> the name of a schema/table class that is then used, via
> C::M::DBIC::Schema, to get a resultset.
In a project I'm working on, I'm converting an existing site to use
Catalyst. At least 50% of the app's code is in the models, which use
Alzabo. I wasn't really interested in tightly integrating my model with
Catalyst, as I don't see the benefit, so I've written some small shim
plugins as needed. Mostly, they just get the database handle out of the
Alzabo model code (sessions), or they use the model to find a user
I think it's to Catalyst's credit that this was really pretty easy. I
never would try to use Catalyst for this project if it also meant
rewriting my models, since that's where all the really complex code for
the app lives, and rewriting it is out the question (at least for now).
Your guide to all that's veg. My book blog
More information about the Catalyst