You are here: Re: To OOP or not to OOP « PHP Programming Language « IT news, forums, messages
Re: To OOP or not to OOP

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация