K
Keith Bowes
Berislav said:Although OOP is a great way to program and especially to keep your code and
design neat and easy to update, I still see PHP as a procedure-oriented
language, and don't see what is to be gained by introducing the plethora of
OOP features. I mean, PHP is (primarily) used for server-client HTTP-based
applications, where on each HTTP request the script is evaluated, parsed and
performed again. Even if we put all our code into a single PHP file (which
is a common practice) and the code is cached to speed things up, we still
have a blank slate each time the file is called, and we have to resend all
the values.
Well, PHP is still useful for shell, command-line and GUI scripting
(it's a lot easier than Perl). Though, even though most scripts are
small and hidden, maybe those that want it have a bad feeling when not
OOPing. Also, PHP 4 has a half-baked OO-system, so the least that PHP 5
can do is fully bake it (removing it altogether wouldn't be an option,
especially because of PEAR).
As for my personal opinion, I don't care too much for OOP. I mean that
I don't mind using OO libs, but I never catch myself actually making
objects. I really don't see how it's better than procedural (maybe this
is due to my BASIC background).