Problems in understanding GEF! [message #183587] |
Sun, 05 June 2005 20:50 |
Eclipse User |
|
|
|
Originally posted by: RWotsch.gmx.de
Hallo,
With the help of the ShapeEditor example (GEF-examples-3.1M7) I have tried
to understand what the essential components of a GEF based application
are.
I have also read the article of Randy Hudson ("How to get started with the
GEF).
However, I still have a few questions.
Fist what is the Model?
I can fancy nothing under the concept.
I thought the model is an object that contains data.
Views:
I thought Views are figures which are displayed on the monitor.
How were the Views implemented in the ShapesEditor example?
EditParts:
An EditPart is a controller that maps models with the views.
He translate received requests into commands which are used to change the
model.
EditPartPolicies describe the behaviour of an EditPart and which requests
the EditPart can handle.
Have I properly understood this?
For what is the EditPartFactory used?
I hope that somebody can help me.
|
|
|
|
|
Re: Problems in understanding GEF! [message #183656 is a reply to message #183650] |
Mon, 06 June 2005 12:46 |
Eclipse User |
|
|
|
Originally posted by: RWotsch.gmx.de
Hallo
At first thanks for your help.
But I have an other problem in understanding GEF.
I have read an article on the site
"http://www.eclipse.org/newsgroups/index.html " which describes the MVC
architecture.
After I have read the article, I am a little bit confused on how the
Model-View-Controller working together ("2.1.4) Model - view - controller
working together :").
At this picture which he uses to explain the interations between the M-V-C
you can see that the GUI initializes the changes of the model. In his
example by using the Method setProperty().
However, I do not understand how the GUI does this. How do the GUI now
about methods to change the model.
I thought the GUI send requests to the EditPart and the EditPart do the
changes of the model and its view.
I hope you can help me to understand this thing.
|
|
|
Re: Problems in understanding GEF! [message #183664 is a reply to message #183594] |
Mon, 06 June 2005 12:48 |
Eclipse User |
|
|
|
Originally posted by: RWotsch.gmx.de
Hallo
At first thanks for your help.
But I have an other problem in understanding GEF.
I have read the article on the site
"http://www.eclipse.org/newsgroups/index.html".
After I have read the article, I am a little bit confused on how the
Model-View-Controller working together ("2.1.4) Model - view - controller
working together :").
At this picture which he uses to explain the interations between the M-V-C
you can see that the GUI initializes the changes of the model. In his
example by using the Method setProperty().
However, I do not understand how the GUI does this. How do the GUI now
about methods to change the model.
I thought the GUI send requests to the EditPart and the EditPart do the
changes of the model and its view.
I hope you can help me to understand this thing.
|
|
|
Re: Problems in understanding GEF! [message #183687 is a reply to message #183656] |
Mon, 06 June 2005 16:29 |
Eclipse User |
|
|
|
Originally posted by: christian.sell.netcologne.de
Hi,
I havent read the article you point to, but I can talk from experience.
In GEF, the interaction is roughly as follows:
- user performs an action that is intended to modify the model (e.g.,
deletes a figure)
- drawing layer (draw2d) gets edit policy from editpart
- edit policy hands back a command
- command is executed and modifies the model
from there, the resulting changes must be propagated back to the drawing
layer. This is usually done by publishing events from the model, for
which the edit part registers. The edit part then has to update the display.
I personally dont like the event publishing part much, because it puts
requirements on my model just for the sake of graphical representation.
But I think the above is the "canonical way", so I wont go into further
details here ;-).
christian
Robert Wotsch wrote:
> Hallo
>
> At first thanks for your help.
>
> But I have an other problem in understanding GEF.
>
> I have read an article on the site
> "http://www.eclipse.org/newsgroups/index.html " which describes the MVC
> architecture. After I have read the article, I am a little bit confused
> on how the
> Model-View-Controller working together ("2.1.4) Model - view -
> controller working together :").
>
> At this picture which he uses to explain the interations between the
> M-V-C you can see that the GUI initializes the changes of the model. In
> his example by using the Method setProperty().
>
> However, I do not understand how the GUI does this. How do the GUI now
> about methods to change the model.
>
> I thought the GUI send requests to the EditPart and the EditPart do the
> changes of the model and its view.
>
> I hope you can help me to understand this thing.
>
|
|
|
Powered by
FUDForum. Page generated in 0.09585 seconds