[Dbix-class] minimalistic Moose / DBIC glue module

Drew Taylor drew at drewtaylor.com
Wed Jun 23 11:19:01 GMT 2010


On Wed, Jun 23, 2010 at 5:09 AM, Eden Cardim <edencardim at gmail.com> wrote:
>
> Have you considered using bridge objects + delegation instead? The
> separation between storage and business logic is something you're going
> to want in the future anyway.

Thanks for pointing out delegation. Delegating search(), create(), etc
in my business logic class to a DBIC Result object will definitely
make things simpler.

I had thought in the past about where to separate the business logic.
Do I do it in MyApp::Hotel or MyApp::Schema::Result::Hotel? Obviously
canned queries go in MyApp::Schema::ResultSet::Hotel, but where's the
dividing line between an operation on a Result object? What policies
are other people using to determine this?

Thanks,
Drew



More information about the DBIx-Class mailing list