[nycphp-talk] Writing Database Agnostic Code
Allen Shaw
ashaw at polymerdb.org
Wed Feb 14 11:59:30 EST 2007
Brian Dailey wrote:
> So my question boils down to this: how does one balance writing code
> that works regardless of the backend and still keep things optimized
> for speed and clarity? Are there any generalized tips that any of you
> can share from your experiences?
Don't forget to ask how portable your code *needs* to be. In the
beginning I spent a lot of energy being concerned about this because I'd
heard it was important, but later I realized that many of my projects
are proprietary, not for general distribution, meaning that the chance
of the database server changing is relatively small, and therefor
justifying code that takes advantage of a particular db engine. A
couple of my projects have been released as Open Source, and wide
adoption is a priority; therefore, for those projects, I'm willing to
accept a slight decrease in performance in exchange for allowing the end
user more flexibility in the choice of db.
- Allen
--
Allen Shaw
Polymer (http://polymerdb.org)
slidePresenter (http://slides.sourceforge.net)
More information about the talk
mailing list