[PLUG] PHP OOP Programming question

gepr at tempusdictum.com gepr at tempusdictum.com
Fri Jun 4 12:01:02 UTC 2004


Dan Haskell writes:
 > 
 > On Fri, 4 Jun 2004 gilmanhunt at comcast.net wrote:
 > 
 > > deadlines, tasks, id numbers, etc, what is the approved way to have
 > > tasks use the database. Should make a base class that includes the db
 > 
 > Have you looked at PEAR? It's designed to be "a framework and distribution
 > system for reusable PHP components." More to the point, it has a
 > standardized database interface. Theoretically, you could code an
 > application to use one DMBS and later switch to another without a lot of
 > effort. I say "theoretically", because I have not done it yet myself. :)

This is good advice.  I have two things to add:

1) There is no "approved" way of using "safe" scripting environments
   like PHP (and it's ilk).  Those tools were created for (and are
   best for) relatively small jobs where you're trying to optimize 
   between so-so programmers, high throughput, and rapid development.

   So, this implies that the real answer is:  do whatever works.

2) If you're stuck in a position where you have to use a lightweight
   tool like PHP to do heavy lifting, then, by _any_ means necessary,
   jump on some bandwagon with a community of developers and use a
   set of tools that can be debugged, used, and criticized by as
   large a number of people as possible.

   E.g. the only reason perl [cough] even _works_ is because there are
   so many people _involved_ in it.

And I'll throw in a piece of opinionated trash, too: If you want to
learn OOP, start with smalltalk ... or, maybe, Sather or Self.  Don't
pollute your thinking with garbage like Java, C++, PHP, Perl6, etc.
If, however, those obscure languages are not interesting and you
aren't inclined towards purity, pick something reasonable like Python.

-- 
glen e. p. ropella              =><=                           Hail Eris!
H: 503.630.4505                              http://www.ropella.net/~gepr
M: 971.219.3846                               http://www.tempusdictum.com





More information about the PLUG mailing list