Re: OOP slow -- am I an idiot?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ed Lazor wrote:

On Oct 12, 2006, at 10:18 AM, Richard Lynch wrote:
I can't architect a good OOP solution to a problem that hasn't been
fully defined, any more than one can architect a house without knowing
all the rooms that are needed...

Sorry to jump into the middle of the conversation, but I thought this was a pretty interesting comment. It serves as one of those occasional reminders that I need to go back and study OOP structure design a bit more. I know you're right about the importance of a fully defined problem, but it also seems that the reverse is true if you're really good with OOP. In other words, it seems like any high quality solution starts by defining least common denominators. You start with basic building blocks and expand from there; I'm always amazed when I see space stations or other complex structures built out of Legos, for example. My problem is that I usually look at OOP and think it'll take too long, so I go the non-OOP route, solve the problem, and move on. I can't help but think I'm missing out. I do have libraries of code that I reuse, but I've always heard that I'd benefit a lot more from them if I OOPed them. Dunno... that's my two cents worth anyway hehe

Except that is the attitude that leads to painful OOP in PHP. PHP is not the same environment as C++. The environment (classes, objects, etc) needs to be created and destroyed with each request. As such you cannot start designing a solution unless you know how the data/entities are going to be used. OOP in PHP cannot start with basic building blocks, at least not if you want a system that performs reasonably well.

-Stut

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux