Re: What databases have taught me

From: Robert Martin <unclebob_at_objectmentor.com>
Date: Sun, 2 Jul 2006 19:33:01 -0500
Message-ID: <2006070219330129560-unclebob_at_objectmentorcom>


On 2006-07-01 00:59:01 -0500, frebe73_at_gmail.com said:

>>> Arrrrrg! Hierarchy taxonomies (sub-types) of people, companies, or
>>> products is a BIG NO-NO!  Even you agreed that "OO is not about
>>> hierarchies".
>> 
>> They are not a big No-No all by themselves.  Most applications are
>> complex enough that simply structures like this are naive, but they
>> aren't forbidden, especially if the app is simple.

>
> The problem with hierachial taxonomies is that are too inflexible to
> changes. In the first iterations of the design, these simple constructs
> may be sufficient, but in most cases, they will prove to be too simple
> in the next iterations, and you have to start from scratch again.

You never have to start from scratch. Changing an inheritance hierarchy into a composition hierarchy need not be a significant change.

-- 
Robert C. Martin (Uncle Bob)  | email: unclebob_at_objectmentor.com
Object Mentor Inc.            | blog:  www.butunclebob.com
The Agile Transition Experts  | web:   www.objectmentor.com
800-338-6716                  |
Received on Mon Jul 03 2006 - 02:33:01 CEST

Original text of this message