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


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

Reply via email to