|
Posted by L. Berger on 05/29/07 15:17
My 2 cents. I come from a Java and Visual C++ background, so I am very
comfortable with OOP. When I developed a website that now gets about
100,000 viewers a day, I did OOP. That's because PHP5 was touted to be
better with OOP.
Long story short. My code is now procedural. Very clean, organized in
functions and commented richly, and separated out in files (which is
how you'd separate "Class" files anyway). Over time I realized two
things;
1. Minimize require calls. (And use require instead of include or
include_once or require_once).
2. Use an accelerator, such as eAccelerator. This compiles your code
and basically boils it down to one include in most cases.
In reality, if you are learning the language then OOP may be a classy
thing to learn and it's good to know. Performance wise procedural is
best. I don't buy the cleanliness and maintenance stuff one bit.
Procedural code can be equally clean and well laid out. And it
performs significantly better -- no instantiation of classes and
objects.
This is simply my experience.
Navigation:
[Reply to this message]
|