On Thu, October 12, 2006 1:03 pm, 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

Rapid prototyping in OOP, if you're willing to chuck the prototyping
if it turns out to be the "wrong" OOP model is do-able.

Even building the basic blocks first is fine -- but you've got to have
the whole structure in your mind if you expect those blocks to fit in
well.

This is probably not really specific to OOP, but I think it tends to
be more obvious with OOP when you start trying to "work around" the
short-sighted architecture.  By which I only mean that in procedural
programming, the work-arounds feel less like work-arounds, at least at
first, as they are not so obviously work-arounds, and just look like
more functions.

To get back to the ORIGINAL point -- OOP is not about raw performance.

It's about maintainability, code re-use, encapsulation, etc.

You can get acceptable performance from OOP if you know what you are
doing -- If you don't, it's super easy for a beginner to write a total
performance hog following all the best practices in the world.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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

Reply via email to