Re: What databases have taught me

From: topmind <topmind_at_technologist.com>
Date: 3 Jul 2006 14:38:27 -0700
Message-ID: <1151962707.937376.104800_at_v61g2000cwv.googlegroups.com>


Robert Martin wrote:
> 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.

One could perhaps say the same about those "evil" Case/Switch statements also. Generally I find it better to keep classification/category info in the database if possible, not the code. This is because it is easier to inspect it as data than as code because one can query it to get just about any view you need, not the view that the coder forced on you. One could perhaps say the same about code editors, but even the best code editors use navigational structures (because code tends to be navigational), and navigational querying has yet to mature to anywhere near relational querying (and perhaps never will because I consider it the Goto of structures). But some dig navigational for reasons that escape me.

>
> --
> Robert C. Martin (Uncle Bob) | email: unclebob_at_objectmentor.com

-T- Received on Mon Jul 03 2006 - 23:38:27 CEST

Original text of this message