Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Problems in understanding GEF!
Problems in understanding GEF! [message #183587] Sun, 05 June 2005 20:50 Go to next message
Eclipse UserFriend
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 #183594 is a reply to message #183587] Mon, 06 June 2005 00:09 Go to previous messageGo to next message
Vineet Sinha is currently offline Vineet SinhaFriend
Messages: 31
Registered: July 2009
Member
Look at (one or more of):
http://www.eclipse.org/articles/Article-GEF-diagram-editor/s hape.html
http://www.redbooks.ibm.com/abstracts/sg246302.html
http://eclipsewiki.editme.com/GefDescription

Vineet


Robert Wotsch wrote:
> 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 #183650 is a reply to message #183587] Mon, 06 June 2005 09:51 Go to previous messageGo to next message
Andreas Holtz is currently offline Andreas HoltzFriend
Messages: 53
Registered: July 2009
Member
Robert Wotsch schrieb:
> 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.

The model are the objects, that you want to visualize and which contains
the information you want to show.

>
> Views:
> I thought Views are figures which are displayed on the monitor. How were
> the Views implemented in the ShapesEditor example?
in GEF you use Figures. take a look at draw2d.IFigure and drawd.Figure

> 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?
Yes. I think so.
>
> For what is the EditPartFactory used?
Look at the Factory-Pattern (Gang of Four ;-) )
It creates an EditPart depending on the given model.

> I hope that somebody can help me.
I hope i could and didn´t tell crap :-)
>
>
>
Re: Problems in understanding GEF! [message #183656 is a reply to message #183650] Mon, 06 June 2005 12:46 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
>
Previous Topic:Access restriction on draw2D.jar
Next Topic:Composition of EditParts?
Goto Forum:
  


Current Time: Tue Dec 03 08:24:10 GMT 2024

Powered by FUDForum. Page generated in 0.09585 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top