[Catalyst] ActiveRecord for Perl

Matt S Trout dbix-class at trout.me.uk
Wed May 23 01:07:46 GMT 2007


On Tue, May 22, 2007 at 03:46:16PM -0500, Peter Karman wrote:
> 
> 
> Christopher H. Laco wrote on 5/22/07 2:47 PM:
> 
> >Well, to be fair to RDBO, I'm just not as familiar with it as I am with
> >DBIC. When I was doing the storage layer for RDBO, what I missed (aside
> >from deploy) was the *_related methods and the fact that resultsets are
> >chainable. DBIC appears to take the approach that given object A, I can
> >always get to related object B through object A accessors, helpers,
> >*_related etc.
> >
> >RDBO seemed to tale take the opposite approach. Instead of working from
> >one object to another, you went through *Manager classes when odd things
> >are called for.
> >
> 
> Actually, RDBO works like you describe DBIC. The *Manager classes are for 
> groups of objects. For one object to another, you use the fk and 
> relationship Metadata definitions (1-1, 1-m, m-m, etc).
> 
>  $objectB = $objectA->objectB;

So far as I can see, the basic difference is -

DBIx::Class aims for "fast enough" and "extremely extensible/flexible"

Rose::DB::Object aim for "extremely fast" and "extensible/flexible enough"

I discussed merging the projects with jcs a while back but he didn't see the
point of the ResultSet chaining system, which I consider DBIC's key killer
feature - until you've used it you don't realise it's something every other
ORM is missing (see Paul Graham's lisp vs. blub articles).

Personally, I see this as a great shame - for want of jcs understanding the
use of one feature, the chance to have a single project was lost.

In the meantime, RDBO is a brilliantly well-written system and if you're with
jcs in not seeing the point of the (functional-ish/set-arithmetic-ish resultset
concept) and not wanting to be able to subclass to override at any level of
the process, it's a very useful option.

I usually tell people to examine both and choose whichever best suits their
project - the experienced developers seem -usually- to end up going for 
"DBIx::Class by default, Rose::DB::Object when they need speed over features"
but that's my personal experience from discussion with a few hundred perl
developers, not a statement of intent/recommendation.
Rose::DB::Object

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/             http://www.shadowcatsystems.co.uk/ 



More information about the Catalyst mailing list