Re: when is OOP a good choice?
| From: | php at errorcode dot com | Date: | Thu, 13 Feb 2003 04:26:52 +0000 |
| Subject: | Re: when is OOP a good choice? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-135388@lists.php.net to get a copy of this message | ||
On 12 Feb 2003 at 21:50, anders thoresson wrote:
> I've just started to read about - and will soon try to write - object
> oriented code. I think I've got the basics both from the PHP-books I have,
> and from various sources on the web.
>
> But nowhere have I read a good explanation to two of my questions:
>
> 1. What are the main benefits from OOP?
> 2. When is OOP a good choice for a PHP script, and when is ordinary
> functions a better call?
Whenever it's obvious :) ... Actually I think there is a BIG
difference between simply using object oriented syntax and actually
*developing* in OO. Personally, I've been doing OO in Perl for quite
awhile and use it for PHP as well, but I still do it more in a
modular sense. imho, OO is a paradigm shift in thinking about how you
will architect (of course I've seen some work that just throws
everything in one file and repeats the exact same code every 50
lines) your application. I'm trying to squeeze myself into fully
understanding the OO way. I like it.
In the end, TMTOWTDI, don't get caught by the hype but the apps that
I've had the most success with evolving and debugging where those
written more like the OO way than just any old way.
Peter
"Reality is that which, when you stop believing in it, doesn't go
away".
-- Philip K. Dick