[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipse-incubator-e4-dev] Initial discussion onthe'modelled'workbench UI
|
[...]
2) The protocol currently enforced in the ControlFactory's 'createGUI'
and 'disposeGUI' methods be the -only- path through with rendering
elements are managed. This is needed to enforce the CSS styling (as well
as a way to maintain sanity in the world...;-). Tom, the reason that the
'clientArea' gets added to the 'contents' as well as being its own
property is to get the rendering for take place in the ControlFactory's
'processContents' part of the protocol).
well so it is a "workaround" to make the generic method work. I think
what's happening is that because your model is so generic and it is easy
to abuse its features adding the attribute has no modeling reason you
but the only reason is an implementation detail.
That's why I don't overly generic models like e.g. JavaScript-Objects
whose counterpart in Java is a Hash because you can add/remove
properties like you want. Freedom is good but too much freedom leads to
anarchy.
What do you really gain with code like this:
-------8<-------
element.setProperty(GuiModel.WIDGET,comp);
-------8<-------
against code like this:
-------8<-------
element.setWidget(comp);
-------8<-------
In fact IMHO you have the same amount of API (your Property-Constants
are API as well but one has to do a lot of reading documentation/code to
find out it is) but the latter is documenting itself: The Model-Element
has the possibility to restore a property named widget which is of type
Widget.
I've done a lot of JavaScript programming and always hated that I had to
switch between the HTML-Documentation and my code. A browsers DOM is a
well defined structure that's why tooling can help this is not true for
any model and kills productivity.
Tom
--
B e s t S o l u t i o n . a t EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl leiter softwareentwicklung/CSO
------------------------------------------------------------------------
eduard-bodem-gasse 8/3 A-6020 innsbruck phone ++43 512 935834