[Catalyst] Alternatives to DBIx?

J. Shirley jshirley at gmail.com
Sat Apr 17 23:36:46 GMT 2010


On Sat, Apr 17, 2010 at 4:04 PM, John Karr <brainbuz at brainbuz.org> wrote:
> I think there's a very important difference of approach, much as Template Tool Kit and Template Declare, radically different approaches, that are both far superior to the classic CGI Module.
>
> Working in raw DBI is the opposite of the DRY principle which underlies having a framework in the first place, so I am seeking an alternative. Just as Catalyst uses MVC, DBIx chooses ORM, but that paradigm is not the only way to be effective PERL<==>SQL glue. From the Manpage Fey::SQL looks like what I want: neatly wrapped and sweetened SQL, without the repetition and overhead inherent in working from DBI. I'm going to spend some time working with it and also with SQL::DB, when I have a more educated opinion I will share it. Both Fey and SQLDB are a nativist approach to SQL (much like TT is to html), and I would argue that in keeping the PERL paradigm of many ways to accomplish a task, the choice between a SQL-native DBI wrapper and an ORM wrapper should be up to the individual, the issue seems to be finding a worthy SQL-native wrapper.
>
> In my own analysis the Time and Effort to learn DBIx is greater than the Time wasted writing repetitious DBI code, the time I've already invested on DBIx has shown that there is a better way than DBI, but for me it isn't DBIx.
>
>

Please understand that DBIx means "Extensions to DBI", it does not
mean DBIx::Class.  This is abbreviated as "DBIC" but not "DBIx".
There's a canned response to people who do this, but I'll save you
that... if you look at
http://search.cpan.org/search?mode=all&query=DBIx you'll see all the
modules that have nothing to do with DBIx::Class that are listed
there.

I think Fey is a reasonable alternative if you aren't looking for the
advanced features that DBIC gets you, but your general sentiment about
the difference between an SQL API and an ORM is spot on.

(Also, you may want to stick to writing Perl as "perl" is just as
wrong as DBIC being called DBIx.)

-J



More information about the Catalyst mailing list