Follow Up: [Catalyst] Alternatives to DBIx:Class?

"Alex J. G. Burzyński" mailing-catalyst at ajgb.net
Mon Apr 19 22:20:17 GMT 2010


Hi,

On 2010-04-19 22:37, John Karr wrote:
> Most of the responses to this thread seem to say that DBIC is worth the
> effort. I looked at Fey:SQL and SQL::DB and concluded that they also require
> some effort, and suffer (along with DBIC) from what is for me a huge issue
> -- the documentation focuses on telling you how each piece works rather than
> on how to drive the darn thing.
>
> At this point for everything I'm working on, I have the luxury that I can
> write all of my joins and complex statements into a view or
> stored_procedure, but in the real world programmers are too frequently
> denied this, so even though right now I would like something that just
> wrapped the DBI up in a manner that made it easy to write and keep the DRY
> principle, it would be potentially more valuable to learn DBIC or Fey. DBIC
> is the more widely adapted solution, while Fey seems to offer most of the
> same capability with a syntax that draws on SQL (which is a lot of points in
> its' favor), but has less momentum and lacks equivalents of some of the
> helper scripts that are available for DBIC.
>
> So let me ask a follow up: What materials would you provide to an
> Intermediate Level Programmer to help them learn either Fey or DBIC?
> Materials could be working code, articles, things in documentation,
> documentation for other things that happens to explain it well, chapters in
> books, etc.
>
> Afternote. There is a "tutorial" in Fey::ORM's documentation, but it is more
> of a quick run-through. DBIx::Class has a better introduction in its'
> documentation, but that hasn't helped me much. The tutorial Kennedy Clark
> wrote for the Catalyst Manual was how I figured out Catalyst. Again
> developer isn't my normal job title, I will probably never get paid for
> knowing anything about ORM, time I spend learning it is only a benefit if it
> gives me pleasure (not so far) or saves me time in the long run (the clock
> is running the other way).
>
>    


Since you've mentioned stored procedures I'm letting myself to mention 
DBIx::BlackBox.

I've created it at $work to ease the integration of my Catalyst app with 
existing MS SQL database with hundreds of tables, views and stored 
procedures.

The main driver was that I don't really want to learn all relationships 
between those tables + I've got very skilled DBA in my team who already 
knows this database :)

So all those complex queries can happily live and be optimized at 
database level, while I can deal with data returned by those stored 
procedures.

But I'm a huge fan of DBIx::Class and I can assure you that time spent 
on learning it won't be wasted, because maybe with your next job there 
won't be so complex queries and typing SELECT t1.col1, t2.col2 FROM tab1 
JOIN tab2 all over the place is just a waste of time if you can simply 
write $tab1->col1, $tab1->tab2->col2.

Regarding documentation I've found DBIx::Class man pages good enough + 
most of the Catalyst examples/blogs are bundled with DBIC ones.

Cheers,
Alex





More information about the Catalyst mailing list