Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Is DBIC following the ActiveRecord pattern?

by McA (Curate)
on Jul 09, 2013 at 08:20 UTC ( #1043260=perlquestion: print w/ replies, xml ) Need Help??
McA has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

does DBIx::Class (strictly) follow the Active record pattern (http://en.wikipedia.org/wiki/Active_record_pattern)?

I'm asking because there are methods accessible from a single object (e.g.->update), but also methods which are called on the ResultSet object. Also object (row) creation seems to be done via the ResultSet and not by the object itself.

I'm really interested in the design. So, does the object know how to persist itself? The answer seems to be 'yes' concerning an update, but 'no' concerning the initial persistence.

Where are the OO-people out there? How do you think about it (despite probably recommending DBIC as the one and only)?

Best regards
McA

Comment on Is DBIC following the ActiveRecord pattern?
Download Code
Re: Is DBIC following the ActiveRecord pattern?
by daxim (Chaplain) on Jul 09, 2013 at 08:31 UTC
    mst in #dbix-class says:
    ActiveRecord-"ish". Class::DBI was very much AR style. DBIC is AR-except-not-as-retarded.

      Hey

      thank you for being our PerlMonks-IRC-gateway... :)

      Can you ask what "AR-except-not-as-retarded" mean? ;)

      Best regards
      McA

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1043260]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2014-10-21 17:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (106 votes), past polls