[thelist] php design question

Jackson Yee jyee at vt.edu
Tue Nov 19 17:01:01 CST 2002


"David U." <davidu at everydns.net> wrote in message
news:001f01c28f56$5139d820$2532fc80 at pravda...
> You're kind of right.  I specifically didn't mention the words "object
> oriented" in my post.  PHP does not *yet* have a way to create totally OO
> code.  Things like private variables, scope, etc are not yet functional.
It
> does have inheritance and lots of other goodies though which make it
almost
> a pleasure to work with -- certainly better than writing large
applications
> of monolithic code. (been there done that)  Additionally, almost all of
the
> benefits of code reuse and flexibility are there right now; TODAY.

PHP 5 will have support for such features, as I've been drooling over the
features list for exception handling, inheritance, and other things for a
while now.

As far as using OO with PHP goes, use it if you're comfortable with it;
don't use it if you can write better code using functions.  I'm too much of
a C++ programmer not to use encapsulation or inheritance in my code, and the
entire forums section is handled in three lines of PHP - instantiating the
object, setting options on the object, and writing the object out.   Someone
else might find it easier to write a monolithic function to do everything.
That's their choice.  Even great designs can end up in horrible code if you
assign a horrible coder to implement it.

--
Regards,
Jackson Yee
jyee at vt.edu
http://www.jacksonyee.com/





More information about the thelist mailing list