http://qs1969.pair.com?node_id=458592


in reply to Re: Perl books I'd like to have.
in thread Perl books I'd like to have.

Now that it was mentioned could anyone tell me some reason why would I want to dumb down my relational database to an object store? I don't know, maybe it feels good to those that only feel comfortable in Perl to be shielded from SQL, but I find this a little silly. Why would I want to use Class::DBI?

Jenda
XML sucks. Badly. SOAP on the other hand is the most powerfull vacuum pump ever invented.

  • Comment on Why Class::DBI? (was Re^2: Perl books I'd like to have.)

Replies are listed 'Best First'.
Re: Why Class::DBI? (was Re^2: Perl books I'd like to have.)
by jplindstrom (Monsignor) on May 19, 2005 at 12:53 UTC
    Class::DBI is to a database what DreamWeaver is to HTML.

    You can use it as an object store (or do web page layout), or use it to avoid having to write all that SQL (or HTML) code and just fiddle with the code when the tool doesn't do what you wanted it to.

    It's about productivity.

    You still need to know what you're doing though. A database is a not-very-black box, and web design is only partly about visual design.

    /J

Re: Why Class::DBI? (was Re^2: Perl books I'd like to have.)
by adrianh (Chancellor) on May 19, 2005 at 13:34 UTC
    Why would I want to use Class::DBI?

    I use it for the times when the SQL that I'd be writing is so pointlessly simple and repetitive that it's a better use of my time to get the computer to write it for me. There are enough hooks in Class::DBI for me to write the SQL that I need to write for efficiency reasons so what I gain on the swings I also gain on the roundabouts.

    Do I use it all of the time? Hell no. Sometimes the way I'll be using my data is so far away from the Class::DBI view of the world that I'd spend more time getting around it than using it. For simple CRUD applications however it's a boon.

    IMHO of course :-)