My experience is that Eclipse’s GEF can be a little intimidating to pick up. The easiest way I’ve found to explain it is something like the following:
We start with a Canvas on which we can draw things - lines, shapes, text, etc. In order to make drawing more convenient we gather up drawing commands into reusable Figures. So now we’re at the state of Eclipse’s Draw2D - we can create 2D drawings on a canvas. But suppose we want to do more than just look at pretty drawings? Suppose we want to manipulate them and the corresponding data they represent? This is where GEF comes in.
GEF adds an Model View Controller (MVC) layer to Draw2D. Each editable figure has its own controller called an EditPart. EditParts are responsible for linking views to models and handling user input. User interaction is handled by a request/response model. GEF captures all user interaction and then forwards these requests to the appropriate edit part. The edit part can in turn delegate these requests to one or more policies which allow for grouping of common response behaviors.
The end result is a lot of objects with specific roles and if one doesn’t understand the design pattern layers in GEF it can be a little confusing. I’ve put together a simple presentation of these ideas that I use to introduce GEF. This is all explained in much more detail on the GEF website and particularly the wiki . Also, the EclipseCon 2005 GEF tutorial is pretty good.
Commentary