Graphical Editing Framework: Difference between revisions

Content deleted Content added
Restructured the article and rewrote some passages
Line 13:
 
=== Model-View-Controller Pattern in GEF ===
[[Model-View-Controller]] is an architectural design pattern which divides an application into seperateseparate parts which communicate which each other in a specific way. The goal is to separate data model (model), graphical user interface (view) and business logic (controller). GEF uses the MVC pattern extensively.
* Model: The data model can either be generated using EMF, self-implemented by the user or it may already exist in case of a legacy software.
* Controller: The EditParts act as controllers. Typically, each model element has its matching EditPart. EditParts may contain other EditParts thereby matching model elements containing other model elements. EditParts also have a reference to the figure which graphically represents the model element. Finally, EditParts evaluate requests and create the appropriate command to edit the unterlyingunderlying model.
* View: For each element within the model, including connections, a figure has to be implemented using the Draw2d framework. Oftentimes the figure is some geometrical drawing.