Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gmf-dev] GMF "philosophical" question

Hallo, all!
 
I already posted this in the newsgroup, but I am not convinces that there is better place... I think my question belongs more here.
Anyway, any ideas are welcome...
 
Set-up:
The model used in the experiment is as follows:

Root<>---0..1->Block-----
........................|_0..*__|

(later modified like this: add containment)
Root<>---0..1->Block<>--
.........................|_0..*__|


Where, Root represents the diagram element (the canvas) and the Block
represents a tree-like structure.

Small experiment:
Step1: Using GMF, the set-up is modeled in ecore and then all the steps
performed till achieving diagram editor, which allows graphical modeling of
directed acyclic graphs using our simple DSL.
Step2: Change the ecore model as shown in the set-up (change the
self-reference of the Block to containment). DO NOT regenerate the diagram
editor (only the model) and run. It does not crash! It works! But the graph
is not graph any more....

Philosophical question:
Directed acyclic graph (you can use the DSL above). Always (intuitive for
the user) it is presented as nodes and edges and it is a tree-like
structure. For example:
.........................Node4
............Node2<
Node1< .............Node5
............\
..............Node3
There are two implementations possible. 1. Using containment. 2. Using
references.

Now the question. Based on the experiment, GMF does not allow to choose the
implementation, if you have preference (fixed) graphical representation. My
humble opinion is that in MVC, the model and the view are decoupled via the
controller. So that the model structure and semantics in independent from
the view representation and semantics.

Small example why I may have preference to one of the approaches (case 1):
the model represents DSL. The DSL is containing the structure and the
semantics of the domain. If my domain is "car", I expect that my car
contains 4 wheels and 3/5 doors, etc. But the view may be still graph-like
structure.

So, am I wrong (missing something) in applying GMF? Is there really such
assumption while generating the view? Can I overcome it still using GMF or I
have to use separately EMF and GEF?
Best regards,
Hristina

--
XpucmuHa MOHEBA / Hristina MONEVA

Back to the top