arborint wrote:AKA Panama Jack wrote:Way before OOP came on the scene programmers were building libraries of functions that had just as much reusability and testability. We had to do this to increase the speed of creating new applications and projects. I personally have a library of specialized functions I use in other projects that are not OOP but are used just like an OOP would be.
Well ... modular programming is a proven methodology. I am sure you use it to good effect. But when you say "but are used just like an OOP would be" it makes me think you really don't understand what OO is.
Actually I am very familier with OOP programming. I have been doing it for many years on different languages.
arborint wrote:AKA Panama Jack wrote:As I said before OOP is fine for LIMITED use with PHP due to the massive execution overhead caused by PHP's implimentation of OOP. Sure you will get people saying it doesn't matter because we have shared servers and you can always use a more powerful server.
Your "massive execution overhead" statement simply is not true from my experience. You work on a PHP based game, which from my point of view is a very specialized application. And as you probably are doing it on your own, server resources are proably scarce. So I can understand where your coming from. But it is not the norm.
Actually the server resources aren't scarce. Bandwidth limitations come into play way before server resources even get close to being a limitation.
arborint wrote:AKA Panama Jack wrote:Thing is if I were a hosting company I would rather have 100 sites on my server that were not using PHP OOP and maxing the server than the alternative of 10 sites that did use all OOP and maxing the server.
I am positive that hosting companies could care less.
Actually they care ALOT. You will find most hosting companies with virtual hosting have server usage limitations based upon one of many or all factors from bandwidth usage to CPU usage to database queries/usage. Most hosting companies have a limit of 10% CPU load per site for a set number of seconds. If you go over those limitations they usually require you to change to a dedicated server. It is very EASY to go over those limits if you have a moderately active site that uses alot of OOP coding.
arborint wrote:AKA Panama Jack wrote:The less load your PHP applications cause the better for everyone.
Why? Performance is certainly part of the equation, but not usually at the top in my experience. I find that being able to complete project on-time, testablity, maintainablity, changabiity are all more important than performance.
Yes, but that is because you can tell the client they need to upgrade thier servers instead of making the code better. That is alot of the problem with programming anymore. Programmers hope everyone will throw hardware at the problem instead of making the programmers create more efficient code.
If you look at what I have posted I have nothing against OOP programming. OOP programming is great depending upon the language using it. Creating an application that is totally OOP driven in C doesn't have any of the limitations of a totally OOP application written in PHP. PHP has some serious issues with memory allocation and creation of OOP objects. Especially if they are large objects. From the way PHP seems to act, and I haven't gone into the internals, it is almost like it is performing a line by line EVAL on the object being created. That's about the only reason I can think for it being so SLOW in creating a new object because allocating the needed memory would not be that slow.
If they were to greatly reduce or eliminate the high overhead in creating an OOP object in PHP then I would agree everyone should use OOP as often as they can... Maybe they will make progress with PHP 6 but PHP 4/5 still have some serious overhead issues.