Re: What databases have taught me
Date: 23 Jun 2006 12:44:49 -0700
> I think a distinction between macro and micro-OO needs to be made. At a
> macro level OO may be as good or bad as any other method of structuring
I've found network of objects to be worse than most. The architectural "components" you tend to write in decent O-O systems aren't really objects at all in any normal sense; witness SOA, CORBA, etc. Those aren't objects, and pretending they are (e.g. in Java where everything has to be an object) is silly.
> At a micro level OO works extremely well.
It's theoretically fine for implementing user-defined types, but is notoriously brittle because of the common mistake of viewing them as functional containers rather than types.
> Somewhere in the middle
> there's a crossover point and it's not always clear where that point is.
> Things like "devices" or "windows" or "customers" can be reasonable
> classes in a hierarchy but at the top level things are not as clear.
> > OO is hierarchy. Enforcing a hierarchy where none exists is an utterly
> > dire and destructive artifice.
> Exactly, hierarchy where hierarchy exists.
We're creating systems, not trying to emulate reality (in which, by the way, it's clear real hierarchies are rare). Emulating reality is another phantasm conjured by O-O.
> All this, of course, is well known since the very early days of OO.
Perhaps, but those early days aren't taught; only the religion is (or was - I see encouraging signs that things are changing).
> It just seems impossible to learn unless you go through the above-mentioned
Maybe. It's discouraging to think this stuff can't be taught; perhaps if industry and academia weren't so faddish, the teaching would suffice.