in reply to Wrapper around DBI
Don't blindly adopt or write a wrapper just because "most people say it is not a good practice" to use DBI directly. What do you think the wrapper should do? Wrapping DBI just because "wrapping is good" is plain nonsense. For small CGIs that each just does one little thing with the Database, direct access via DBI may be the best implementation. Wrapping has a cost, usually it slows down things. If you build a big project, plan to store objects in an RDBMS, need to work with a dozen RDBMS, and so on, a wrapper may be a good idea. The wrapper could take care of SQL and meta-data differences, and an object relational mapper (ORM) could act as a wrapper removing the need to manually serialise and deserialise the objects, generating SQL automatically, and so on.
Alexander
|
|---|