http://qs321.pair.com?node_id=626941


in reply to When to use ORMs, Catalyst, etc

Well, things like Catalyst/DBIx::Class certainly appeal to people with objects-on-the-brain (I know this particular "fad" has been around for decades, but I'm afraid it still seems pretty faddish to me), but if you ask me, the first rule in designing a database-backed app is to let the database do the work wherever possible: design the schema first, hand craft the SQL to use the schema efficiently, then think about writing methods that are wrappers around the SQL.

On the other hand, ORM fans praise their "speed of development", and if you don't expect to need to scale up to heavy database use, you might go with the ORM approach instead.

Something I keep meaning to experiment with some time, is developing with Catalyst, then benchmarking/profiling to look for bottle necks (preferably under simulated heavy loads), and then try to refactor around the bottle-necks with the hand-crafted SQL approach. It's at least concievable that there's a best-of-both-worlds hybrid that might work well.

What I'd actually like to see though is a framework that starts with a database schema and creates code around it. I don't understand why I haven't run across one of these yet... it seems like a pretty obvious notion.

Replies are listed 'Best First'.
Re^2: When to use ORMs, Catalyst, etc
by holli (Abbot) on Aug 10, 2007 at 14:04 UTC
    Have you seen Bigtop?


    holli, /regexed monk/