[Catalyst] ActiveRecord for Perl

Christopher H. Laco claco at chrislaco.com
Tue May 22 20:47:40 GMT 2007


mla wrote:
> Christopher H. Laco wrote:
>> mla wrote:
>>> Perrin Harkins wrote:
>>>> On 5/22/07, Adam Bartosik <adam.bartosik at hurra.com> wrote:
>>>>> What I found missing in DBIx::Class is AR method find_by_sql(sql).
>>>> Did you ask about it on the mailing list?  Nearly all of the Perl ORMs
>>>> have support for direct SQL.  I don't know DBIx::Class, but
>>>> "search_literal" sounds like what you want.
>>>>
>>>> I doubt there's anything worth porting in ActiveRecord that one of the
>>>> many Perl options (DBIx::Class, Rose::DB::Object, Class::DBI, Tangram,
>>>> Alzabo) doesn't provide.
>>> If I may ask, Perrin, what do you use?
>>>
>>> Maurice
>>
>> I'm one of those odd birds that's used CDBI, DBIC and RDBO.
>> I've converted from CDBI to DBIC and also written an RDBO layer for a
>> project.
>>
>> /CDBI smart ass comments deleted/ :-)
>>
>> They all have their quirks. DBIC does a great job of getting out of your
>> way. If there's an option, chances are you can set it at the class
>> and/or object instance level, allowing fair amounts of evil to be
>> accomplished. :-)
>>
>> RDBO tickles my fancy if I'm really into triggers at the various stages
>> of data usage. What I really really missed from DBIC when writing RDBO
>> was deploy(). The ability to just kick out a db schema into a DB from a
>> DBIC schema totally rocks.
> =

> Thanks for sharing your experiences. Other than the the deploy() stuff,
> any other criticisms of RDBO? Now that I'm looking at it again, I'm
> liking the design very much.
> =

> I found this thread that compared some of the differences (might be
> outdated now):
> =

>   http://www.gossamer-threads.com/lists/catalyst/users/3095
> =

> What would cause you to *not* use RDBO on a new project?
> =

> Maurice

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.

Managers...ResultSets....

There's been a lot of traffic on RDBO lately polishing helper methods
for relations and other such stuff....

Really, they're both great ORMS. I just prefer DBIC. Some prefer RDBO.
Both are powerful. Just don't use CDBI. :-P

(Sorry, couldn't resist).

Repeat after me: Thou Shalt Never Create A CDBI Storage Layer For
Handel. :-)

-=3DChris

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070522/2d12=
4634/signature.pgp


More information about the Catalyst mailing list