|P is for Practical|
Is DBIC following the ActiveRecord pattern?by McA (Priest)
|on Jul 09, 2013 at 08:20 UTC||Need Help??|
McA has asked for the
wisdom of the Perl Monks concerning the following question:
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)?