[Dbix-class] Re: Result, ResultSet and load_namespaces

Patrick Meidl patrick at pantheon.at
Thu Jul 26 17:57:15 GMT 2012


On Thu, Jul 26 2012, Alejandro Imass <aimass at yabarana.com> wrote:

> It would seem obvious to many that the "ResultSet" directory name
> would refer to extend methods at the ResultSet level (duh!), but _a
> lot of people_ seem to interpret that the ResultSet classes are an
> elegant way of extending the row-level classes of the Result
> directory, and this IMHO is where a lot of the confusion stems from.

the Result classes represent your domain model, whereas a ResultSet is a
service which fetches the domain models from the database. in terms of
design patterns, you could say that a ResultSet is a DAO (data access
object), although it lacks the abstraction from the underlying data
source.

so to me, it is very clear that the ResultSet and the Result classes are
two completely different kinds of classes.

> The elegant way to extend row-level methods is by extending the code
> in the Result classes below the checksum created by Loader?

exactly.

    patrick

-- 
Patrick Meidl ........................ patrick at pantheon.at
Vienna, Austria ...................... http://gplus.to/pmeidl




More information about the DBIx-Class mailing list