Re: EAV (Re: Object-relational impedence)

From: topmind <topmind_at_technologist.com>
Date: Sat, 29 Mar 2008 17:03:53 -0700 (PDT)
Message-ID: <832cc7da-aac1-442c-8f49-99067ae35ac3_at_s37g2000prg.googlegroups.com>


Dmitry A. Kazakov wrote:
> 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.

With the existing implementations of RDBMS, I reluctantly have to agree. However, in an ideal world, Dynamic Relational would exist so that we wouldn't need to go to the dark side (OOP).

>
> 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.

I'd prefer references rather than containment. This would allow say an embedded panel to but "popped out" in a dedicated screen if the user wanted. And have a form be windowed in another in one tab, but by itself in another.

Besides, all we need is a "parentWidgetID" to have a basic hierarchy with tables.

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

I don't see why this has to be the case. We may want a form-level handler to take precedence over a widget-specific handler in some cases. The priority should be developer-alterable at run-time. Tables would be much better at tracking all these priorities than a tree.

The biggest drawback of an OOP GUI system is that it is difficult to make a cross-language OO framework. Each OOP language has such different rules about inheritance and encapsulation such that building a sharable framework is sticky. Most successful cross-language frameworks tend to be declarative, and OOP is anti-declarative for the most part.

>
> --
> Regards,
> Dmitry A. Kazakov
> http://www.dmitry-kazakov.de

-T- Received on Sun Mar 30 2008 - 01:03:53 CET

Original text of this message