# [EMAIL PROTECTED] / 2006-10-12 06:49:22 +0100:
> Roman Neuhauser wrote:
> ># [EMAIL PROTECTED] / 2006-10-11 21:28:36 +0100:
> >>Richard Lynch wrote:
> >>>This is a classic example of the "obvious" OOP solution being wildly
> >>>inappropriate.
> >>Ok, so I now find myself in the unusual position of disagreeing with the 
> >>Lynchmeister. Why is this wildly inappropriate? IMHO this is what OOP is 
> >>all about.

    [...]

> I never said anything about physical entities. The OOP methodology has 
> nothing to do with physical entities, but it has everything to do with 
> entities. The fact that in this example the entity is physical has no 
> bearing on it whatsoever. Nobody said anything about limiting OOP 
> entities to physical entities.

    Right, sorry for going off on a tangent, it was 3am. :]
 
> When you're talking about something as simple as a customer it's true 
> that an OOP approach probably doesn't add much to the equation. However, 
> when you're dealing with complex entities which span several tables and 
> have data stored in a different format to how it's used (think 
> serialize) it makes sense to have a single point where you can get that 
> data so that you don't end up duplicating the code needed to extract and 
> store it.

    I'll have most of that handled by the database through triggers,
    updatable views, foreign keys etc.
 
> >>If this is not what you think OOP is all about, do please enlighten us 
> >>as to the error of our ways.
> >
> >    Imagine deleting many rows in a table one by one (pseudocode):
> <snip>
> >    instead of taking them with a single DELETE:
> <snip>
> 
> Whoa nellie!! This is a question of design, not a question of whether to 
> use OOP.

    Sure. I think "obvious" is the key word in Richard's statement:

> >>>This is a classic example of the "obvious" OOP solution being wildly
> >>>inappropriate.

    AFAICS he says that the "obvious" solution is wrong, not that OOP
    is wrong here.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

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

Reply via email to