RE: [PHP] Alley-OOP! ... or not?

2002-07-15 Thread Cal Evans

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
often.)

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.

HTH,
=C=

*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*


-Original Message-
From: Martin Clifford [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 10:05 AM
To: [EMAIL PROTECTED]
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
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Alley-OOP! ... or not?

2002-07-15 Thread Jay Blanchard

[snip]
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!
[/snip]

OOP, selectively (emphasis on that) used in PHP can yield untold benefits,
depending on the application. I have found it very handy to create classes
that can be used with a myriad of processes. I use classes for customer and
other objects within our business that can be readily defined. Saves a ton
of coding when something new comes up. If need be new modules or
applications can derive the customer class as it is going to be used.

I have seen folks report that PHP OOP is slow, bullcocka...with today's
processors it is not noticeable (unless your OOP style is bad). Also, PHP
OOP is not true OOP, it lacks some of the rules needed to make it so. Again,
when used selectively I have found it to be a bonus rather than a
hinderance.

Jay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Alley-OOP! ... or not?

2002-07-15 Thread Henning Sittler

Why not try it for yourself?  If it seems helpful then use it, if not then
don't.  


Henning Sittler
www.inscriber.com



-Original Message-
From: Martin Clifford [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 11:05 AM
To: [EMAIL PROTECTED]
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
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php