Re: EAV (Re: Object-relational impedence)

From: Brian Selzer <brian_at_selzer-software.com>
Date: Sat, 29 Mar 2008 15:37:13 GMT
Message-ID: <JmtHj.30759$R84.5485_at_newssvr25.news.prodigy.net>


"Dmitry A. Kazakov" <mailbox_at_dmitry-kazakov.de> wrote in message news:e5lufueeu155.t1s8vlmxjhpt.dlg_at_40tude.net...
> On Sat, 29 Mar 2008 04:47:01 GMT, Brian Selzer wrote:
>
>> There is a table for attributes that are common to all
>> possible widgets, and a table for each set of attributes that are common
>> not
>> to all possible widgets, but rather to a subset of all possible widgets.
>
> It is interesting to see people reinventing the wheel (class). The set of
> "all possible widgets having attributes T, U, V" is a class.
>

That depends upon how you define what is a class. The set of all possible widgets having attributes T, U, V, such that T and U have the same sign is a different class. The set of all possible widgets having attributes T, U, V such that T and V have the same sign is also a different class. Under this definition, a widget may be a member of all three classes, right?

> But that is not my point. The problem with widgets hierarchy is that there
> are three axes of widget relations. You were discussing only one of them
> attributes, which is usually directly mapped to types. This is not that
> big
> deal. More difficult are other two:
>
> 2. Visual containment. Widgets can consist of / contain other widgets.
>

If a widget consists of other widgets, then it must have attributes that are also widgets. If a widget contains other widgets, then it either has one attribute for each contained widget or an attribute that is a set of widgets. Visual containment can be defined in terms of attributes, so I don't understand why it is a problem.

> 3. Signal handing. Handlers of widget events are composed in a certain
> hierarchical way.
>

You don't store widgets, you store snapshots of widgets. How one widget communicates with another has no bearing on how the snapshots of each are stored. So where is the problem?

> --
> Regards,
> Dmitry A. Kazakov
> http://www.dmitry-kazakov.de
Received on Sat Mar 29 2008 - 16:37:13 CET

Original text of this message