Building off of what Jay said...

I'm a hardcore OOP developer but agree that you must use it judiciously.
Used in the correct way it makes maintaining/extending your applications
much easier.  There are times though when you don't want it.

I usually find myself coding pages that have PHP in them.  However, whenever
I can abstract a task from the page and move it into an object that can be
reused, I do.  ALMOST ALL of my database interaction goes through objects.
(I do some quickies where I'll code a mysql_query line in the page, but not

If it is a discrete task (database interaction) or an abstraction of a
physical object (Person, Invoice, Order) then I use object.  The code in the
page mainly creates objects and manipulates them.


* Cal Evans
* The Virtual CIO

-----Original Message-----
From: Martin Clifford [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 10:05 AM
Subject: [PHP] Alley-OOP! ... or not?

Hey all,

I've seen quite a few programs that seem to greatly favor Object Orienting
Programming (OOP) in their code.  I don't mean to start a holy war or
anything of the sort, but as a burgeoning PHP developer, I would like the
opinions of my peers.

So how about it, ladies and gents?  Tell me about the Pros and Cons to OOP,
and why you prefer to use it/not use it!

Personally, I've always used regular functions to accomplish my repetetive
tasks, and OOP seems rather daunting for me, but I'm always open to new (and
hopefully, more efficient) ideas!  Thanks!

Martin Clifford
Developer's Forums:

PHP General Mailing List (
To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to