On Apr 17, 2010, at 7:59 AM, John Karr wrote:
Thanks Lyle and Ovid for your responses, both SQL::DB and Fey::SQL
look like
saner approaches, and I will take them both for a test drive. I also
liked
the article Lyle referenced.
-----Original Message-----
From: Lyle [mailto:webmas...@cosmicperl.com]
Sent: Saturday, April 17, 2010 9:36 AM
To: The elegant MVC web framework
Subject: Re: [Catalyst] Alternatives to DBIx?
Personally I think DBIx::Class is the biggest load of crock out there.
It's much slower, awkward to use, time consuming to learn, and as soon
as you try to do some complicated queries you'll end up dropping it
anyway. ORMs simply cannot work in the long run:-
http://www.codinghorror.com/blog/2006/06/object-relational-mapping-is-the-vi
etnam-of-computer-science.html
Just to put it out there -- I think for every dev who has arrived at
this conclusion there are more who think DBIx::Class and Rose::DB and
friends are wonderful.
DBIC does have one caveat that can make it bad a choice: it requires
some rigor in your database schema. Broken, bad, goofy DB
relationships make DBIC a poor choice because you might have to
resort to crazy code to make things work. If your schema is sane,
everything, even extremely complicated queries are generally easy
(after you get ramped up, it does have a learning curve).
Of course you can use straight DBI etc and if it's what you're used to
it will be much faster at first. The main issue is that you'll get
templates or controllers littered with shims, iterators, raw SQL etc.
You could of course start pushing it back into the model yourself but
what that'll be doing is slowly reinventing one of the other ORMs but
much less well.
This is basically "every Perl developer has to write his own
templating language once to learn why it's such a bad," part 2. You'll
have to learn a lot either way. The Stone Soup of rolling it yourself
is seductive and seems easier but taken as a whole it is most
certainly not.
-Ashley
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/