Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

In order of importance I want the following from a DB abstraction module:

  1. Make DB interactions safer
  2. Make DB interactions easier
  3. Make DB interactions consistent

Using DBI is not that difficult, but it is very repetitive, and often very verbose. Repetitive and verbose tasks tend to suffer from lazy mistakes in the code (especially from cut and paste errors).

By simplifying the access to the databas, I make my life easier, while also reducing the chance of programming errors (in my code, not necesarily the abstraction module itself), and my code ends up more consistent.

Now whether you abstract the DB using functions to do the repetitive work, or you use objects to represent the data is just personal preference, as both can gain you the same benefits.

Personally I like treating my tables as classes and rows as objects. This means I have used Class::DBI for quite some time, but lately I have been tempted to use Rose::DB::Object, which so far has seemed much cleaner and nicer to work with than Class::DBI. I guess time will tell which one I stick with, but Rose::DB::Object should definately be on the list of 'things to check out' for people that are looking into database abstraction.


In reply to Re: What do people want from DB abstraction modules? by cees
in thread What do people want from DB abstraction modules? by techcode

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-25 13:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found