[CDBI] Re: Apps using Class::DBI

Christopher H. Laco claco at chrislaco.com
Wed Mar 29 19:24:44 BST 2006


Lance A. Brown wrote:
> That is some people's feelings.  I've been using CDBI for a couple years
> now on various projects, nothing huge, and have been quite pleased with
> it.  I've also tried wrapping my head around DBIC and failed to grok it
> properly.  This is probably my failing, but CDBI serves my purposes.
> 
> --[Lance]
> 
> Eric Berg wrote:
>> So's that the generally accepted take on this issue:  new dev should be
>> DBIx::Class, and not Class::DBI?
> 

I currently use Class::DBI in Handel (http://handelframework.com/), but
am converting from CDBI to DBIC.

While it has not cause me many problems, the problems it causes are hard
to fix without some hackery jiggery pokery. DBIC fixes most of those
problems natively.

(Someone will correct me I'm sure)
First, there's the threading/forking issues of CDBI based projects, esp.
when it comes to preloading in things like Apache/ModPerl. DBIC is more
thread/fork friendly out of the box.

Transactions. It's possible in CDBI, but it's hackish at best. DBIC is
built wwith then in mind, instead of as an afterthought.

In a CDBI world, everything ISA Class::DBI object. This is ok n some
situations, but in others it causes serious API issues (my API vs. CDBI
API, SUPER::, etc). While DBIC can still use this model, it can also
work just as well in the background using delegation to instances. Even
better, you can have the same set of model classes at the same time go
to two different databases/connections.

And as a general statement, CDBI is good at what it does if you keep it
simple. If you're looking into some really complicated relationships, or
delegation to instances (vs. ISA), or just a general amount of
options/flexibility, then I'd pick DBIC over CDBI for new development.

-=Chris

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.digitalcraftsmen.net/mailman/private/classdbi/attachments/20060329/5249c411/signature.pgp


More information about the ClassDBI mailing list