[nycphp-talk] Database vs. Code
Daniel Convissor
danielc at analysisandsolutions.com
Mon Nov 30 10:25:19 EST 2009
Hi Matt:
> As an FYI, I've done this 3-4 different ways in the past, where the DAL
> was in stored procedures, a "man in the middle" code approach, and inside
> shared libraries. The problem with shared libraries right now is that
> there are multiple front ends, and even if they are in PHP, some are
> object oriented (MVC), and some are procedural. Also, some of the front
> ends may be developed not in PHP, which would render those libraries
> useless. The man in the middle approach is too big for us at this point.
> So that really only leaves stored procedures, but I always question
> putting all this logic in the database.
As you realize, there needs to be a programming language layer (in PHP,
Perl, Python, Java, whatever) no matter what. It is how the data gets
passed to the DBMS, whether it is via INSERT statements, prepared
statements, or executing stored procedures.
All of them work and they're all pretty much the same when it comes to
the programming language layer.
I've never sat down and examined the speed of each approach. Has anyone
here?
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
More information about the talk
mailing list